@@ -113,24 +113,45 @@ LL | asm!("nop");
113113 | ^^^^^^^^^^^
114114
115115error: this `unsafe` block contains 2 unsafe operations, expected only one
116- --> tests/ui/multiple_unsafe_ops_per_block.rs:110:9
116+ --> tests/ui/multiple_unsafe_ops_per_block.rs:109:5
117+ |
118+ LL | / unsafe {
119+ LL | |
120+ LL | | f();
121+ LL | | f();
122+ LL | | }
123+ | |_____^
124+ |
125+ note: unsafe function call occurs here
126+ --> tests/ui/multiple_unsafe_ops_per_block.rs:111:9
127+ |
128+ LL | f();
129+ | ^^^
130+ note: unsafe function call occurs here
131+ --> tests/ui/multiple_unsafe_ops_per_block.rs:112:9
132+ |
133+ LL | f();
134+ | ^^^
135+
136+ error: this `unsafe` block contains 2 unsafe operations, expected only one
137+ --> tests/ui/multiple_unsafe_ops_per_block.rs:118:9
117138 |
118139LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
119140 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120141 |
121142note: unsafe function call occurs here
122- --> tests/ui/multiple_unsafe_ops_per_block.rs:110 :18
143+ --> tests/ui/multiple_unsafe_ops_per_block.rs:118 :18
123144 |
124145LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
125146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126147note: raw pointer dereference occurs here
127- --> tests/ui/multiple_unsafe_ops_per_block.rs:110 :43
148+ --> tests/ui/multiple_unsafe_ops_per_block.rs:118 :43
128149 |
129150LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
130151 | ^^^^^^^^^^^^^^^^^^
131152
132153error: this `unsafe` block contains 2 unsafe operations, expected only one
133- --> tests/ui/multiple_unsafe_ops_per_block.rs:131 :9
154+ --> tests/ui/multiple_unsafe_ops_per_block.rs:139 :9
134155 |
135156LL | / unsafe {
136157LL | |
@@ -140,18 +161,18 @@ LL | | }
140161 | |_________^
141162 |
142163note: unsafe function call occurs here
143- --> tests/ui/multiple_unsafe_ops_per_block.rs:133 :13
164+ --> tests/ui/multiple_unsafe_ops_per_block.rs:141 :13
144165 |
145166LL | x();
146167 | ^^^
147168note: unsafe function call occurs here
148- --> tests/ui/multiple_unsafe_ops_per_block.rs:134 :13
169+ --> tests/ui/multiple_unsafe_ops_per_block.rs:142 :13
149170 |
150171LL | x();
151172 | ^^^
152173
153174error: this `unsafe` block contains 2 unsafe operations, expected only one
154- --> tests/ui/multiple_unsafe_ops_per_block.rs:143 :13
175+ --> tests/ui/multiple_unsafe_ops_per_block.rs:151 :13
155176 |
156177LL | / unsafe {
157178LL | |
@@ -161,18 +182,18 @@ LL | | }
161182 | |_____________^
162183 |
163184note: unsafe function call occurs here
164- --> tests/ui/multiple_unsafe_ops_per_block.rs:145 :17
185+ --> tests/ui/multiple_unsafe_ops_per_block.rs:153 :17
165186 |
166187LL | T::X();
167188 | ^^^^^^
168189note: unsafe function call occurs here
169- --> tests/ui/multiple_unsafe_ops_per_block.rs:146 :17
190+ --> tests/ui/multiple_unsafe_ops_per_block.rs:154 :17
170191 |
171192LL | T::X();
172193 | ^^^^^^
173194
174195error: this `unsafe` block contains 2 unsafe operations, expected only one
175- --> tests/ui/multiple_unsafe_ops_per_block.rs:154 :9
196+ --> tests/ui/multiple_unsafe_ops_per_block.rs:162 :9
176197 |
177198LL | / unsafe {
178199LL | |
@@ -182,18 +203,18 @@ LL | | }
182203 | |_________^
183204 |
184205note: unsafe function call occurs here
185- --> tests/ui/multiple_unsafe_ops_per_block.rs:156 :13
206+ --> tests/ui/multiple_unsafe_ops_per_block.rs:164 :13
186207 |
187208LL | x.0();
188209 | ^^^^^
189210note: unsafe function call occurs here
190- --> tests/ui/multiple_unsafe_ops_per_block.rs:157 :13
211+ --> tests/ui/multiple_unsafe_ops_per_block.rs:165 :13
191212 |
192213LL | x.0();
193214 | ^^^^^
194215
195216error: this `unsafe` block contains 2 unsafe operations, expected only one
196- --> tests/ui/multiple_unsafe_ops_per_block.rs:184 :5
217+ --> tests/ui/multiple_unsafe_ops_per_block.rs:192 :5
197218 |
198219LL | / unsafe {
199220LL | |
@@ -204,18 +225,18 @@ LL | | }
204225 | |_____^
205226 |
206227note: unsafe function call occurs here
207- --> tests/ui/multiple_unsafe_ops_per_block.rs:186 :9
228+ --> tests/ui/multiple_unsafe_ops_per_block.rs:194 :9
208229 |
209230LL | not_very_safe();
210231 | ^^^^^^^^^^^^^^^
211232note: modification of a mutable static occurs here
212- --> tests/ui/multiple_unsafe_ops_per_block.rs:187 :9
233+ --> tests/ui/multiple_unsafe_ops_per_block.rs:195 :9
213234 |
214235LL | STATIC += 1;
215236 | ^^^^^^^^^^^
216237
217238error: this `unsafe` block contains 2 unsafe operations, expected only one
218- --> tests/ui/multiple_unsafe_ops_per_block.rs:199 :5
239+ --> tests/ui/multiple_unsafe_ops_per_block.rs:207 :5
219240 |
220241LL | / unsafe {
221242LL | |
@@ -225,18 +246,18 @@ LL | | }
225246 | |_____^
226247 |
227248note: unsafe function call occurs here
228- --> tests/ui/multiple_unsafe_ops_per_block.rs:201 :9
249+ --> tests/ui/multiple_unsafe_ops_per_block.rs:209 :9
229250 |
230251LL | not_very_safe();
231252 | ^^^^^^^^^^^^^^^
232253note: unsafe function call occurs here
233- --> tests/ui/multiple_unsafe_ops_per_block.rs:202 :9
254+ --> tests/ui/multiple_unsafe_ops_per_block.rs:210 :9
234255 |
235256LL | foo_unchecked().await;
236257 | ^^^^^^^^^^^^^^^
237258
238259error: this `unsafe` block contains 2 unsafe operations, expected only one
239- --> tests/ui/multiple_unsafe_ops_per_block.rs:206 :5
260+ --> tests/ui/multiple_unsafe_ops_per_block.rs:214 :5
240261 |
241262LL | / unsafe {
242263LL | |
@@ -245,15 +266,15 @@ LL | | }
245266 | |_____^
246267 |
247268note: unsafe method call occurs here
248- --> tests/ui/multiple_unsafe_ops_per_block.rs:208 :9
269+ --> tests/ui/multiple_unsafe_ops_per_block.rs:216 :9
249270 |
250271LL | Some(foo_unchecked()).unwrap_unchecked().await;
251272 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
252273note: unsafe function call occurs here
253- --> tests/ui/multiple_unsafe_ops_per_block.rs:208 :14
274+ --> tests/ui/multiple_unsafe_ops_per_block.rs:216 :14
254275 |
255276LL | Some(foo_unchecked()).unwrap_unchecked().await;
256277 | ^^^^^^^^^^^^^^^
257278
258- error: aborting due to 11 previous errors
279+ error: aborting due to 12 previous errors
259280
0 commit comments