提交 72ebce0e 编写于 作者: O Oliver Scherer

Remove unintended noisy log statement

上级 6937ca2c
......@@ -928,7 +928,7 @@ pub fn copy_op_transmute(
// array length computation, `typeck` may not have yet been run and errored out. In fact
// most likey we *are* running `typeck` right now. Investigate whether we can bail out
// on `typeck_tables().has_errors` at all const eval entry points.
error!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest);
debug!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest);
throw_unsup!(TransmuteSizeDiff(src.layout.ty, dest.layout.ty));
}
// Unsized copies rely on interpreting `src.meta` with `dest.layout`, we want
......
[ERROR rustc_mir::interpret::place] Size mismatch when transmuting!
src: OpTy {
op: Immediate(
Scalar(
0x0000000000000001,
),
),
layout: TyLayout {
ty: usize,
details: LayoutDetails {
variants: Single {
index: 0,
},
fields: Union(
0,
),
abi: Scalar(
Scalar {
value: Int(
I64,
false,
),
valid_range: 0..=18446744073709551615,
},
),
largest_niche: None,
align: AbiAndPrefAlign {
abi: Align {
pow2: 3,
},
pref: Align {
pow2: 3,
},
},
size: Size {
raw: 8,
},
},
},
}
dest: PlaceTy {
place: Ptr(
MemPlace {
ptr: AllocId(0).0x0,
align: Align {
pow2: 3,
},
meta: None,
},
),
layout: TyLayout {
ty: &[u8],
details: LayoutDetails {
variants: Single {
index: 0,
},
fields: Arbitrary {
offsets: [
Size {
raw: 0,
},
Size {
raw: 8,
},
],
memory_index: [
0,
1,
],
},
abi: ScalarPair(
Scalar {
value: Pointer,
valid_range: 1..=18446744073709551615,
},
Scalar {
value: Int(
I64,
false,
),
valid_range: 0..=18446744073709551615,
},
),
largest_niche: Some(
Niche {
offset: Size {
raw: 0,
},
scalar: Scalar {
value: Pointer,
valid_range: 1..=18446744073709551615,
},
},
),
align: AbiAndPrefAlign {
abi: Align {
pow2: 3,
},
pref: Align {
pow2: 3,
},
},
size: Size {
raw: 16,
},
},
},
}
error: any use of this value will cause an error
--> $DIR/transmute-size-mismatch-before-typeck.rs:10:29
|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册