Commit 88f5744
authored
Rollup merge of rust-lang#85306 - LeSeulArtichaut:thir-unsafeck, r=nikomatsakis
Add DerefOfRawPointer and CallToFunctionWith to THIR unsafeck
Extends THIR unsafeck to check for two more cases of unsafe operations: dereferences of raw pointers and calls to functions with `#[target_feature]` (RFC 2396). The check for the latter is pretty much copy-pasted from the existing MIR equivalent.
This will clash with rust-lang#83842 and rust-lang#85273 which are arguably more important, let's maybe focus on getting those merged first, this can wait.
r? `@nikomatsakis`
cc rust-lang/project-thir-unsafeck#7File tree
30 files changed
+260
-25
lines changed- compiler/rustc_mir_build/src
- src/test/ui
- generator
- issues
- rfcs/rfc-2396-target_feature-11
- traits
- unsafe
30 files changed
+260
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
151 | 167 | | |
152 | 168 | | |
153 | 169 | | |
154 | 170 | | |
155 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
156 | 177 | | |
157 | 178 | | |
158 | 179 | | |
| |||
203 | 224 | | |
204 | 225 | | |
205 | 226 | | |
206 | | - | |
207 | 227 | | |
208 | 228 | | |
209 | 229 | | |
| |||
213 | 233 | | |
214 | 234 | | |
215 | 235 | | |
216 | | - | |
217 | 236 | | |
218 | 237 | | |
219 | 238 | | |
| |||
287 | 306 | | |
288 | 307 | | |
289 | 308 | | |
| 309 | + | |
290 | 310 | | |
291 | 311 | | |
292 | 312 | | |
| |||
296 | 316 | | |
297 | 317 | | |
298 | 318 | | |
| 319 | + | |
299 | 320 | | |
300 | 321 | | |
301 | | - | |
302 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
303 | 330 | | |
304 | 331 | | |
305 | 332 | | |
| |||
311 | 338 | | |
312 | 339 | | |
313 | 340 | | |
314 | | - | |
| 341 | + | |
315 | 342 | | |
316 | 343 | | |
317 | 344 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments