diff options
| author | Ben Kimock <kimockb@gmail.com> | 2025-08-04 13:10:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-04 13:10:09 +0000 |
| commit | ee1b237215ee90df2c0102457fa2d0e9c2df8753 (patch) | |
| tree | d7b99f917db35f8a07550c15b2544e0563612b5e /compiler/rustc_const_eval/src/interpret/memory.rs | |
| parent | ee00b998177899c10bea83a38c46627f27496ba2 (diff) | |
| parent | ab7c35995d9489821cc8b70ac1da069090ee56c9 (diff) | |
| download | rust-ee1b237215ee90df2c0102457fa2d0e9c2df8753.tar.gz rust-ee1b237215ee90df2c0102457fa2d0e9c2df8753.zip | |
Merge pull request #4513 from rust-lang/rustup-2025-08-04
Automatic Rustup
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/memory.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/memory.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/memory.rs b/compiler/rustc_const_eval/src/interpret/memory.rs index 47bebf5371a..23b40894f16 100644 --- a/compiler/rustc_const_eval/src/interpret/memory.rs +++ b/compiler/rustc_const_eval/src/interpret/memory.rs @@ -937,8 +937,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // (both global from `alloc_map` and local from `extra_fn_ptr_map`) if let Some(fn_val) = self.get_fn_alloc(id) { let align = match fn_val { - FnVal::Instance(instance) => { - self.tcx.codegen_instance_attrs(instance.def).alignment.unwrap_or(Align::ONE) + FnVal::Instance(_instance) => { + // FIXME: Until we have a clear design for the effects of align(N) functions + // on the address of function pointers, we don't consider the align(N) + // attribute on functions in the interpreter. + // See <https://github.com/rust-lang/rust/issues/144661> for more context. + Align::ONE } // Machine-specific extra functions currently do not support alignment restrictions. FnVal::Other(_) => Align::ONE, |
