Avoid the path trimming ICE lint in error reporting
This commit is contained in:
parent
bbcc1691a4
commit
88f0688530
1 changed files with 4 additions and 8 deletions
|
@ -145,16 +145,12 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||||
assert!(dest.layout.is_sized());
|
assert!(dest.layout.is_sized());
|
||||||
assert_eq!(cast_ty, dest.layout.ty); // we otherwise ignore `cast_ty` enirely...
|
assert_eq!(cast_ty, dest.layout.ty); // we otherwise ignore `cast_ty` enirely...
|
||||||
if src.layout.size != dest.layout.size {
|
if src.layout.size != dest.layout.size {
|
||||||
let src_bytes = src.layout.size.bytes();
|
|
||||||
let dest_bytes = dest.layout.size.bytes();
|
|
||||||
let src_ty = format!("{}", src.layout.ty);
|
|
||||||
let dest_ty = format!("{}", dest.layout.ty);
|
|
||||||
throw_ub_custom!(
|
throw_ub_custom!(
|
||||||
fluent::const_eval_invalid_transmute,
|
fluent::const_eval_invalid_transmute,
|
||||||
src_bytes = src_bytes,
|
src_bytes = src.layout.size.bytes(),
|
||||||
dest_bytes = dest_bytes,
|
dest_bytes = dest.layout.size.bytes(),
|
||||||
src = src_ty,
|
src = src.layout.ty,
|
||||||
dest = dest_ty,
|
dest = dest.layout.ty,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue