11error: this `unsafe` block contains 2 unsafe operations, expected only one
2- --> tests/ui/multiple_unsafe_ops_per_block.rs:37 :5
2+ --> tests/ui/multiple_unsafe_ops_per_block.rs:38 :5
33 |
44LL | / unsafe {
55LL | | STATIC += 1;
@@ -8,20 +8,20 @@ LL | | }
88 | |_____^
99 |
1010note: modification of a mutable static occurs here
11- --> tests/ui/multiple_unsafe_ops_per_block.rs:38 :9
11+ --> tests/ui/multiple_unsafe_ops_per_block.rs:39 :9
1212 |
1313LL | STATIC += 1;
1414 | ^^^^^^^^^^^
1515note: unsafe function call occurs here
16- --> tests/ui/multiple_unsafe_ops_per_block.rs:39 :9
16+ --> tests/ui/multiple_unsafe_ops_per_block.rs:40 :9
1717 |
1818LL | not_very_safe();
1919 | ^^^^^^^^^^^^^^^
2020 = note: `-D clippy::multiple-unsafe-ops-per-block` implied by `-D warnings`
2121 = help: to override `-D warnings` add `#[allow(clippy::multiple_unsafe_ops_per_block)]`
2222
2323error: this `unsafe` block contains 2 unsafe operations, expected only one
24- --> tests/ui/multiple_unsafe_ops_per_block.rs:46 :5
24+ --> tests/ui/multiple_unsafe_ops_per_block.rs:47 :5
2525 |
2626LL | / unsafe {
2727LL | | drop(u.u);
@@ -30,18 +30,18 @@ LL | | }
3030 | |_____^
3131 |
3232note: union field access occurs here
33- --> tests/ui/multiple_unsafe_ops_per_block.rs:47 :14
33+ --> tests/ui/multiple_unsafe_ops_per_block.rs:48 :14
3434 |
3535LL | drop(u.u);
3636 | ^^^
3737note: raw pointer dereference occurs here
38- --> tests/ui/multiple_unsafe_ops_per_block.rs:48 :9
38+ --> tests/ui/multiple_unsafe_ops_per_block.rs:49 :9
3939 |
4040LL | *raw_ptr();
4141 | ^^^^^^^^^^
4242
4343error: this `unsafe` block contains 3 unsafe operations, expected only one
44- --> tests/ui/multiple_unsafe_ops_per_block.rs:53 :5
44+ --> tests/ui/multiple_unsafe_ops_per_block.rs:54 :5
4545 |
4646LL | / unsafe {
4747LL | | asm!("nop");
@@ -51,23 +51,23 @@ LL | | }
5151 | |_____^
5252 |
5353note: inline assembly used here
54- --> tests/ui/multiple_unsafe_ops_per_block.rs:54 :9
54+ --> tests/ui/multiple_unsafe_ops_per_block.rs:55 :9
5555 |
5656LL | asm!("nop");
5757 | ^^^^^^^^^^^
5858note: unsafe method call occurs here
59- --> tests/ui/multiple_unsafe_ops_per_block.rs:55 :9
59+ --> tests/ui/multiple_unsafe_ops_per_block.rs:56 :9
6060 |
6161LL | sample.not_very_safe();
6262 | ^^^^^^^^^^^^^^^^^^^^^^
6363note: modification of a mutable static occurs here
64- --> tests/ui/multiple_unsafe_ops_per_block.rs:56 :9
64+ --> tests/ui/multiple_unsafe_ops_per_block.rs:57 :9
6565 |
6666LL | STATIC = 0;
6767 | ^^^^^^^^^^
6868
6969error: this `unsafe` block contains 6 unsafe operations, expected only one
70- --> tests/ui/multiple_unsafe_ops_per_block.rs:62 :5
70+ --> tests/ui/multiple_unsafe_ops_per_block.rs:63 :5
7171 |
7272LL | / unsafe {
7373LL | | drop(u.u);
@@ -79,55 +79,55 @@ LL | | }
7979 | |_____^
8080 |
8181note: union field access occurs here
82- --> tests/ui/multiple_unsafe_ops_per_block.rs:63 :14
82+ --> tests/ui/multiple_unsafe_ops_per_block.rs:64 :14
8383 |
8484LL | drop(u.u);
8585 | ^^^
8686note: access of a mutable static occurs here
87- --> tests/ui/multiple_unsafe_ops_per_block.rs:64 :14
87+ --> tests/ui/multiple_unsafe_ops_per_block.rs:65 :14
8888 |
8989LL | drop(STATIC);
9090 | ^^^^^^
9191note: unsafe method call occurs here
92- --> tests/ui/multiple_unsafe_ops_per_block.rs:65 :9
92+ --> tests/ui/multiple_unsafe_ops_per_block.rs:66 :9
9393 |
9494LL | sample.not_very_safe();
9595 | ^^^^^^^^^^^^^^^^^^^^^^
9696note: unsafe function call occurs here
97- --> tests/ui/multiple_unsafe_ops_per_block.rs:66 :9
97+ --> tests/ui/multiple_unsafe_ops_per_block.rs:67 :9
9898 |
9999LL | not_very_safe();
100100 | ^^^^^^^^^^^^^^^
101101note: raw pointer dereference occurs here
102- --> tests/ui/multiple_unsafe_ops_per_block.rs:67 :9
102+ --> tests/ui/multiple_unsafe_ops_per_block.rs:68 :9
103103 |
104104LL | *raw_ptr();
105105 | ^^^^^^^^^^
106106note: inline assembly used here
107- --> tests/ui/multiple_unsafe_ops_per_block.rs:68 :9
107+ --> tests/ui/multiple_unsafe_ops_per_block.rs:69 :9
108108 |
109109LL | asm!("nop");
110110 | ^^^^^^^^^^^
111111
112112error: this `unsafe` block contains 2 unsafe operations, expected only one
113- --> tests/ui/multiple_unsafe_ops_per_block.rs:106 :5
113+ --> tests/ui/multiple_unsafe_ops_per_block.rs:107 :5
114114 |
115115LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
116116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117117 |
118118note: unsafe function call occurs here
119- --> tests/ui/multiple_unsafe_ops_per_block.rs:106 :14
119+ --> tests/ui/multiple_unsafe_ops_per_block.rs:107 :14
120120 |
121121LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
122122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123123note: raw pointer dereference occurs here
124- --> tests/ui/multiple_unsafe_ops_per_block.rs:106 :39
124+ --> tests/ui/multiple_unsafe_ops_per_block.rs:107 :39
125125 |
126126LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
127127 | ^^^^^^^^^^^^^^^^^^
128128
129129error: this `unsafe` block contains 2 unsafe operations, expected only one
130- --> tests/ui/multiple_unsafe_ops_per_block.rs:124 :5
130+ --> tests/ui/multiple_unsafe_ops_per_block.rs:125 :5
131131 |
132132LL | / unsafe {
133133LL | | x();
@@ -136,18 +136,18 @@ LL | | }
136136 | |_____^
137137 |
138138note: unsafe function call occurs here
139- --> tests/ui/multiple_unsafe_ops_per_block.rs:125 :9
139+ --> tests/ui/multiple_unsafe_ops_per_block.rs:126 :9
140140 |
141141LL | x();
142142 | ^^^
143143note: unsafe function call occurs here
144- --> tests/ui/multiple_unsafe_ops_per_block.rs:126 :9
144+ --> tests/ui/multiple_unsafe_ops_per_block.rs:127 :9
145145 |
146146LL | x();
147147 | ^^^
148148
149149error: this `unsafe` block contains 2 unsafe operations, expected only one
150- --> tests/ui/multiple_unsafe_ops_per_block.rs:135 :9
150+ --> tests/ui/multiple_unsafe_ops_per_block.rs:136 :9
151151 |
152152LL | / unsafe {
153153LL | | T::X();
@@ -156,18 +156,18 @@ LL | | }
156156 | |_________^
157157 |
158158note: unsafe function call occurs here
159- --> tests/ui/multiple_unsafe_ops_per_block.rs:136 :13
159+ --> tests/ui/multiple_unsafe_ops_per_block.rs:137 :13
160160 |
161161LL | T::X();
162162 | ^^^^^^
163163note: unsafe function call occurs here
164- --> tests/ui/multiple_unsafe_ops_per_block.rs:137 :13
164+ --> tests/ui/multiple_unsafe_ops_per_block.rs:138 :13
165165 |
166166LL | T::X();
167167 | ^^^^^^
168168
169169error: this `unsafe` block contains 2 unsafe operations, expected only one
170- --> tests/ui/multiple_unsafe_ops_per_block.rs:145 :5
170+ --> tests/ui/multiple_unsafe_ops_per_block.rs:146 :5
171171 |
172172LL | / unsafe {
173173LL | | x.0();
@@ -176,12 +176,12 @@ LL | | }
176176 | |_____^
177177 |
178178note: unsafe function call occurs here
179- --> tests/ui/multiple_unsafe_ops_per_block.rs:146 :9
179+ --> tests/ui/multiple_unsafe_ops_per_block.rs:147 :9
180180 |
181181LL | x.0();
182182 | ^^^^^
183183note: unsafe function call occurs here
184- --> tests/ui/multiple_unsafe_ops_per_block.rs:147 :9
184+ --> tests/ui/multiple_unsafe_ops_per_block.rs:148 :9
185185 |
186186LL | x.0();
187187 | ^^^^^
0 commit comments