File tree Expand file tree Collapse file tree 2 files changed +1
-109
lines changed Expand file tree Collapse file tree 2 files changed +1
-109
lines changed Original file line number Diff line number Diff line change @@ -928,7 +928,7 @@ where
928928 // array length computation, `typeck` may not have yet been run and errored out. In fact
929929 // most likey we *are* running `typeck` right now. Investigate whether we can bail out
930930 // on `typeck_tables().has_errors` at all const eval entry points.
931- error ! ( "Size mismatch when transmuting!\n src: {:#?}\n dest: {:#?}" , src, dest) ;
931+ debug ! ( "Size mismatch when transmuting!\n src: {:#?}\n dest: {:#?}" , src, dest) ;
932932 throw_unsup ! ( TransmuteSizeDiff ( src. layout. ty, dest. layout. ty) ) ;
933933 }
934934 // Unsized copies rely on interpreting `src.meta` with `dest.layout`, we want
Original file line number Diff line number Diff line change 1- [ERROR rustc_mir::interpret::place] Size mismatch when transmuting!
2- src: OpTy {
3- op: Immediate(
4- Scalar(
5- 0x0000000000000001,
6- ),
7- ),
8- layout: TyLayout {
9- ty: usize,
10- details: LayoutDetails {
11- variants: Single {
12- index: 0,
13- },
14- fields: Union(
15- 0,
16- ),
17- abi: Scalar(
18- Scalar {
19- value: Int(
20- I64,
21- false,
22- ),
23- valid_range: 0..=18446744073709551615,
24- },
25- ),
26- largest_niche: None,
27- align: AbiAndPrefAlign {
28- abi: Align {
29- pow2: 3,
30- },
31- pref: Align {
32- pow2: 3,
33- },
34- },
35- size: Size {
36- raw: 8,
37- },
38- },
39- },
40- }
41- dest: PlaceTy {
42- place: Ptr(
43- MemPlace {
44- ptr: AllocId(0).0x0,
45- align: Align {
46- pow2: 3,
47- },
48- meta: None,
49- },
50- ),
51- layout: TyLayout {
52- ty: &[u8],
53- details: LayoutDetails {
54- variants: Single {
55- index: 0,
56- },
57- fields: Arbitrary {
58- offsets: [
59- Size {
60- raw: 0,
61- },
62- Size {
63- raw: 8,
64- },
65- ],
66- memory_index: [
67- 0,
68- 1,
69- ],
70- },
71- abi: ScalarPair(
72- Scalar {
73- value: Pointer,
74- valid_range: 1..=18446744073709551615,
75- },
76- Scalar {
77- value: Int(
78- I64,
79- false,
80- ),
81- valid_range: 0..=18446744073709551615,
82- },
83- ),
84- largest_niche: Some(
85- Niche {
86- offset: Size {
87- raw: 0,
88- },
89- scalar: Scalar {
90- value: Pointer,
91- valid_range: 1..=18446744073709551615,
92- },
93- },
94- ),
95- align: AbiAndPrefAlign {
96- abi: Align {
97- pow2: 3,
98- },
99- pref: Align {
100- pow2: 3,
101- },
102- },
103- size: Size {
104- raw: 16,
105- },
106- },
107- },
108- }
1091error: any use of this value will cause an error
1102 --> $DIR/transmute-size-mismatch-before-typeck.rs:10:29
1113 |
You can’t perform that action at this time.
0 commit comments