Skip to content

Commit 681c7ee

Browse files
committed
interning doesn't check alignment anymroe, because it doesn't do any more projections.
1 parent f6ee4bf commit 681c7ee

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

compiler/rustc_const_eval/src/const_eval/eval_queries.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::mem;
2-
31
use either::{Left, Right};
42

53
use rustc_hir::def::DefKind;
@@ -75,9 +73,7 @@ fn eval_body_using_ecx<'mir, 'tcx>(
7573
None => InternKind::Constant,
7674
}
7775
};
78-
let check_alignment = mem::replace(&mut ecx.machine.check_alignment, CheckAlignment::No); // interning doesn't need to respect alignment
7976
intern_const_alloc_recursive(ecx, intern_kind, &ret)?;
80-
ecx.machine.check_alignment = check_alignment;
8177

8278
debug!("eval_body_using_ecx done: {:?}", ret);
8379
Ok(ret)

0 commit comments

Comments
 (0)