Use Pointer::dangling for ZST's in trans_const_value
This commit is contained in:
parent
c067be07c1
commit
34be539ca4
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ pub(crate) fn trans_const_value<'tcx>(
|
||||||
|
|
||||||
if layout.is_zst() {
|
if layout.is_zst() {
|
||||||
return CValue::by_ref(
|
return CValue::by_ref(
|
||||||
crate::Pointer::const_addr(fx, i64::try_from(layout.align.pref.bytes()).unwrap()),
|
crate::Pointer::dangling(layout.align.pref),
|
||||||
layout,
|
layout,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue