diff options
| author | bors <bors@rust-lang.org> | 2025-06-19 03:27:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-19 03:27:53 +0000 |
| commit | 8a65ee08296b36342bf7c3cdc15312ccbc357227 (patch) | |
| tree | dd41afef08338c59067cd819c05f4a571ad2f36b /compiler/rustc_codegen_ssa/src | |
| parent | d1d8e386c5e84c4ba857f56c3291f73c27e2d62a (diff) | |
| parent | 986f8cd709f9a9a6ac8888e4f1fe5eaf3dbfdefd (diff) | |
| download | rust-8a65ee08296b36342bf7c3cdc15312ccbc357227.tar.gz rust-8a65ee08296b36342bf7c3cdc15312ccbc357227.zip | |
Auto merge of #142697 - tgross35:rollup-xu4yuq6, r=tgross35
Rollup of 7 pull requests Successful merges: - rust-lang/rust#140247 (Don't build `ParamEnv` and do trait solving in `ItemCtxt`s when lowering IATs) - rust-lang/rust#142507 (use `#[align]` attribute for `fn_align`) - rust-lang/rust#142524 (Weekly `cargo update`) - rust-lang/rust#142606 (AsyncDrop trait without sync Drop generates an error) - rust-lang/rust#142639 (Add a missing colon at the end of the panic location details in location-detail-unwrap-multiline.rs) - rust-lang/rust#142654 (library: Increase timeout on mpmc test to reduce flakes) - rust-lang/rust#142692 (Assorted bootstrap cleanups (step 3)) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/codegen_attrs.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs index 188a9a98ce7..98742255063 100644 --- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs +++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs @@ -3,7 +3,6 @@ use std::str::FromStr; use rustc_abi::ExternAbi; use rustc_ast::expand::autodiff_attrs::{AutoDiffAttrs, DiffActivity, DiffMode}; use rustc_ast::{LitKind, MetaItem, MetaItemInner, attr}; -use rustc_attr_data_structures::ReprAttr::ReprAlign; use rustc_attr_data_structures::{ AttributeKind, InlineAttr, InstructionSetAttr, OptimizeAttr, find_attr, }; @@ -110,17 +109,8 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs { } }; - if let hir::Attribute::Parsed(p) = attr { - match p { - AttributeKind::Repr(reprs) => { - codegen_fn_attrs.alignment = reprs - .iter() - .filter_map(|(r, _)| if let ReprAlign(x) = r { Some(*x) } else { None }) - .max(); - } - - _ => {} - } + if let hir::Attribute::Parsed(AttributeKind::Align { align, .. }) = attr { + codegen_fn_attrs.alignment = Some(*align); } let Some(Ident { name, .. }) = attr.ident() else { |
