only set noalias on Box with the global allocator

This commit is contained in:
Ralf Jung 2024-03-05 11:32:03 +01:00
parent 5a1e5449c8
commit f391c0793b
17 changed files with 75 additions and 28 deletions

View file

@ -204,6 +204,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
pub fn deref<Cx: LayoutTypeMethods<'tcx>>(self, cx: &Cx) -> PlaceRef<'tcx, V> {
if self.layout.ty.is_box() {
// Derefer should have removed all Box derefs
bug!("dereferencing {:?} in codegen", self.layout.ty);
}