about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/memory.rs
diff options
context:
space:
mode:
authorFolkert de Vries <folkert@folkertdev.nl>2025-07-02 11:12:54 +0200
committerFolkert de Vries <folkert@folkertdev.nl>2025-07-16 23:24:32 +0200
commit9c8ab891876b37aac458a7461d904fe593856745 (patch)
treec45dc07eff1a71859ab5e115649a80338c65355a /compiler/rustc_const_eval/src/interpret/memory.rs
parentec0ff720d1a89cb51edd90116c6e70051affa95f (diff)
downloadrust-9c8ab891876b37aac458a7461d904fe593856745.tar.gz
rust-9c8ab891876b37aac458a7461d904fe593856745.zip
use `codegen_instance_attrs` where an instance is (easily) available
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/memory.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/memory.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/memory.rs b/compiler/rustc_const_eval/src/interpret/memory.rs
index 6414821e21d..0dd274b1b00 100644
--- a/compiler/rustc_const_eval/src/interpret/memory.rs
+++ b/compiler/rustc_const_eval/src/interpret/memory.rs
@@ -890,7 +890,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         if let Some(fn_val) = self.get_fn_alloc(id) {
             let align = match fn_val {
                 FnVal::Instance(instance) => {
-                    self.tcx.codegen_fn_attrs(instance.def_id()).alignment.unwrap_or(Align::ONE)
+                    self.tcx.codegen_instance_attrs(instance.def).alignment.unwrap_or(Align::ONE)
                 }
                 // Machine-specific extra functions currently do not support alignment restrictions.
                 FnVal::Other(_) => Align::ONE,