This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 03f1e90
authored
Unrolled build for rust-lang#121681
Rollup merge of rust-lang#121681 - jswrenn:nix-visibility-analysis, r=compiler-errors
Safe Transmute: Revise safety analysis
This PR migrates `BikeshedIntrinsicFrom` to a simplified safety analysis (described [here](rust-lang/project-safe-transmute#15)) that does not rely on analyzing the visibility of types and fields.
The revised analysis treats primitive types as safe, and user-defined types as potentially carrying safety invariants. If Rust gains explicit (un)safe fields, this PR is structured so that it will be fairly easy to thread support for those annotations into the analysis.
Notably, this PR removes the `Context` type parameter from `BikeshedIntrinsicFrom`. Most of the files changed by this PR are just UI tests tweaked to accommodate the removed parameter.
r? `@compiler-errors`File tree
127 files changed
+1379
-1940
lines changed- compiler
- rustc_hir/src
- rustc_trait_selection/src
- solve
- eval_ctxt
- traits
- error_reporting
- select
- rustc_transmute/src
- layout
- tree
- maybe_transmutable
- library/core/src/mem
- src/tools/tidy/src
- tests/ui/transmutability
- abstraction
- alignment
- arrays
- enums
- repr
- malformed-program-gracefulness
- primitives
- references
- safety
- assume
- structs
- repr
- unions
- repr
- visibility
- assume
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
127 files changed
+1379
-1940
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
877 | | - | |
878 | 877 | | |
879 | 878 | | |
880 | 879 | | |
881 | 880 | | |
882 | 881 | | |
883 | 882 | | |
884 | 883 | | |
885 | | - | |
886 | 884 | | |
887 | 885 | | |
888 | 886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
| 552 | + | |
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | 559 | | |
561 | 560 | | |
562 | 561 | | |
| |||
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2960 | 2960 | | |
2961 | 2961 | | |
2962 | 2962 | | |
2963 | | - | |
2964 | 2963 | | |
2965 | 2964 | | |
2966 | 2965 | | |
2967 | | - | |
| 2966 | + | |
2968 | 2967 | | |
2969 | 2968 | | |
2970 | 2969 | | |
| |||
2976 | 2975 | | |
2977 | 2976 | | |
2978 | 2977 | | |
2979 | | - | |
2980 | 2978 | | |
2981 | 2979 | | |
2982 | 2980 | | |
2983 | 2981 | | |
2984 | 2982 | | |
2985 | | - | |
2986 | | - | |
2987 | | - | |
| 2983 | + | |
2988 | 2984 | | |
2989 | 2985 | | |
2990 | 2986 | | |
| |||
2998 | 2994 | | |
2999 | 2995 | | |
3000 | 2996 | | |
3001 | | - | |
3002 | | - | |
3003 | | - | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
3004 | 3000 | | |
3005 | 3001 | | |
3006 | 3002 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
314 | | - | |
| 313 | + | |
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
320 | 319 | | |
321 | 320 | | |
322 | | - | |
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
| |||
355 | 353 | | |
356 | 354 | | |
357 | 355 | | |
358 | | - | |
| 356 | + | |
359 | 357 | | |
360 | 358 | | |
361 | 359 | | |
| |||
367 | 365 | | |
368 | 366 | | |
369 | 367 | | |
370 | | - | |
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
86 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
87 | 101 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | | - | |
20 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
25 | | - | |
26 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | | - | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
40 | | - | |
41 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
46 | | - | |
47 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
48 | 64 | | |
49 | 65 | | |
50 | 66 | | |
51 | 67 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
55 | 75 | | |
56 | 76 | | |
57 | 77 | | |
| |||
60 | 80 | | |
61 | 81 | | |
62 | 82 | | |
63 | | - | |
64 | | - | |
| 83 | + | |
| 84 | + | |
65 | 85 | | |
66 | 86 | | |
67 | 87 | | |
68 | 88 | | |
69 | | - | |
70 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
78 | 103 | | |
79 | 104 | | |
80 | 105 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
| |||
0 commit comments