@@ -113,84 +113,147 @@ 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:111:5
116+ --> tests/ui/multiple_unsafe_ops_per_block.rs:110:9
117117 |
118- LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
119- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118+ LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
119+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120120 |
121121note: unsafe function call occurs here
122- --> tests/ui/multiple_unsafe_ops_per_block.rs:111:14
122+ --> tests/ui/multiple_unsafe_ops_per_block.rs:110:18
123123 |
124- LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
125- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124+ LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
125+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126126note: raw pointer dereference occurs here
127- --> tests/ui/multiple_unsafe_ops_per_block.rs:111:39
127+ --> tests/ui/multiple_unsafe_ops_per_block.rs:110:43
128128 |
129- LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
130- | ^^^^^^^^^^^^^^^^^^
129+ LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
130+ | ^^^^^^^^^^^^^^^^^^
131131
132132error: this `unsafe` block contains 2 unsafe operations, expected only one
133- --> tests/ui/multiple_unsafe_ops_per_block.rs:130:5
133+ --> tests/ui/multiple_unsafe_ops_per_block.rs:131:9
134134 |
135- LL | / unsafe {
135+ LL | / unsafe {
136136LL | |
137- LL | | x();
138- LL | | x();
139- LL | | }
140- | |_____ ^
137+ LL | | x();
138+ LL | | x();
139+ LL | | }
140+ | |_________ ^
141141 |
142142note: unsafe function call occurs here
143- --> tests/ui/multiple_unsafe_ops_per_block.rs:132:9
143+ --> tests/ui/multiple_unsafe_ops_per_block.rs:133:13
144144 |
145- LL | x();
146- | ^^^
145+ LL | x();
146+ | ^^^
147147note: unsafe function call occurs here
148- --> tests/ui/multiple_unsafe_ops_per_block.rs:133:9
148+ --> tests/ui/multiple_unsafe_ops_per_block.rs:134:13
149149 |
150- LL | x();
151- | ^^^
150+ LL | x();
151+ | ^^^
152152
153153error: this `unsafe` block contains 2 unsafe operations, expected only one
154- --> tests/ui/multiple_unsafe_ops_per_block.rs:142:9
154+ --> tests/ui/multiple_unsafe_ops_per_block.rs:143:13
155+ |
156+ LL | / unsafe {
157+ LL | |
158+ LL | | T::X();
159+ LL | | T::X();
160+ LL | | }
161+ | |_____________^
162+ |
163+ note: unsafe function call occurs here
164+ --> tests/ui/multiple_unsafe_ops_per_block.rs:145:17
165+ |
166+ LL | T::X();
167+ | ^^^^^^
168+ note: unsafe function call occurs here
169+ --> tests/ui/multiple_unsafe_ops_per_block.rs:146:17
170+ |
171+ LL | T::X();
172+ | ^^^^^^
173+
174+ error: this `unsafe` block contains 2 unsafe operations, expected only one
175+ --> tests/ui/multiple_unsafe_ops_per_block.rs:154:9
155176 |
156177LL | / unsafe {
157178LL | |
158- LL | | T::X ();
159- LL | | T::X ();
179+ LL | | x.0 ();
180+ LL | | x.0 ();
160181LL | | }
161182 | |_________^
162183 |
163184note: unsafe function call occurs here
164- --> tests/ui/multiple_unsafe_ops_per_block.rs:144 :13
185+ --> tests/ui/multiple_unsafe_ops_per_block.rs:156 :13
165186 |
166- LL | T::X ();
167- | ^^^^^^
187+ LL | x.0 ();
188+ | ^^^^^
168189note: unsafe function call occurs here
169- --> tests/ui/multiple_unsafe_ops_per_block.rs:145 :13
190+ --> tests/ui/multiple_unsafe_ops_per_block.rs:157 :13
170191 |
171- LL | T::X ();
172- | ^^^^^^
192+ LL | x.0 ();
193+ | ^^^^^
173194
174195error: this `unsafe` block contains 2 unsafe operations, expected only one
175- --> tests/ui/multiple_unsafe_ops_per_block.rs:153 :5
196+ --> tests/ui/multiple_unsafe_ops_per_block.rs:184 :5
176197 |
177198LL | / unsafe {
178199LL | |
179- LL | | x.0();
180- LL | | x.0();
200+ LL | | not_very_safe();
201+ LL | | STATIC += 1;
202+ LL | | foo().await;
181203LL | | }
182204 | |_____^
183205 |
184206note: unsafe function call occurs here
185- --> tests/ui/multiple_unsafe_ops_per_block.rs:155:9
207+ --> tests/ui/multiple_unsafe_ops_per_block.rs:186:9
208+ |
209+ LL | not_very_safe();
210+ | ^^^^^^^^^^^^^^^
211+ note: modification of a mutable static occurs here
212+ --> tests/ui/multiple_unsafe_ops_per_block.rs:187:9
213+ |
214+ LL | STATIC += 1;
215+ | ^^^^^^^^^^^
216+
217+ error: this `unsafe` block contains 2 unsafe operations, expected only one
218+ --> tests/ui/multiple_unsafe_ops_per_block.rs:199:5
219+ |
220+ LL | / unsafe {
221+ LL | |
222+ LL | | not_very_safe();
223+ LL | | foo_unchecked().await;
224+ LL | | }
225+ | |_____^
226+ |
227+ note: unsafe function call occurs here
228+ --> tests/ui/multiple_unsafe_ops_per_block.rs:201:9
229+ |
230+ LL | not_very_safe();
231+ | ^^^^^^^^^^^^^^^
232+ note: unsafe function call occurs here
233+ --> tests/ui/multiple_unsafe_ops_per_block.rs:202:9
234+ |
235+ LL | foo_unchecked().await;
236+ | ^^^^^^^^^^^^^^^
237+
238+ error: this `unsafe` block contains 2 unsafe operations, expected only one
239+ --> tests/ui/multiple_unsafe_ops_per_block.rs:206:5
240+ |
241+ LL | / unsafe {
242+ LL | |
243+ LL | | Some(foo_unchecked()).unwrap_unchecked().await;
244+ LL | | }
245+ | |_____^
246+ |
247+ note: unsafe method call occurs here
248+ --> tests/ui/multiple_unsafe_ops_per_block.rs:208:9
186249 |
187- LL | x.0() ;
188- | ^^^^^
250+ LL | Some(foo_unchecked()).unwrap_unchecked().await ;
251+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
189252note: unsafe function call occurs here
190- --> tests/ui/multiple_unsafe_ops_per_block.rs:156:9
253+ --> tests/ui/multiple_unsafe_ops_per_block.rs:208:14
191254 |
192- LL | x.0() ;
193- | ^^^^^
255+ LL | Some(foo_unchecked()).unwrap_unchecked().await ;
256+ | ^^^^^^^^^^ ^^^^^
194257
195- error: aborting due to 8 previous errors
258+ error: aborting due to 11 previous errors
196259
0 commit comments