@@ -113,84 +113,147 @@ LL | asm!("nop");
113
113
| ^^^^^^^^^^^
114
114
115
115
error: 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
117
117
|
118
- LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
119
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118
+ LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
119
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120
120
|
121
121
note: 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
123
123
|
124
- LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
125
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124
+ LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
125
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126
126
note: 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
128
128
|
129
- LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
130
- | ^^^^^^^^^^^^^^^^^^
129
+ LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
130
+ | ^^^^^^^^^^^^^^^^^^
131
131
132
132
error: 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
134
134
|
135
- LL | / unsafe {
135
+ LL | / unsafe {
136
136
LL | |
137
- LL | | x();
138
- LL | | x();
139
- LL | | }
140
- | |_____ ^
137
+ LL | | x();
138
+ LL | | x();
139
+ LL | | }
140
+ | |_________ ^
141
141
|
142
142
note: 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
144
144
|
145
- LL | x();
146
- | ^^^
145
+ LL | x();
146
+ | ^^^
147
147
note: 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
149
149
|
150
- LL | x();
151
- | ^^^
150
+ LL | x();
151
+ | ^^^
152
152
153
153
error: 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
155
176
|
156
177
LL | / unsafe {
157
178
LL | |
158
- LL | | T::X ();
159
- LL | | T::X ();
179
+ LL | | x.0 ();
180
+ LL | | x.0 ();
160
181
LL | | }
161
182
| |_________^
162
183
|
163
184
note: 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
165
186
|
166
- LL | T::X ();
167
- | ^^^^^^
187
+ LL | x.0 ();
188
+ | ^^^^^
168
189
note: 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
170
191
|
171
- LL | T::X ();
172
- | ^^^^^^
192
+ LL | x.0 ();
193
+ | ^^^^^
173
194
174
195
error: 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
176
197
|
177
198
LL | / unsafe {
178
199
LL | |
179
- LL | | x.0();
180
- LL | | x.0();
200
+ LL | | not_very_safe();
201
+ LL | | STATIC += 1;
202
+ LL | | foo().await;
181
203
LL | | }
182
204
| |_____^
183
205
|
184
206
note: 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
186
249
|
187
- LL | x.0() ;
188
- | ^^^^^
250
+ LL | Some(foo_unchecked()).unwrap_unchecked().await ;
251
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
189
252
note: 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
191
254
|
192
- LL | x.0() ;
193
- | ^^^^^
255
+ LL | Some(foo_unchecked()).unwrap_unchecked().await ;
256
+ | ^^^^^^^^^^ ^^^^^
194
257
195
- error: aborting due to 8 previous errors
258
+ error: aborting due to 11 previous errors
196
259
0 commit comments