diff options
| author | bors <bors@rust-lang.org> | 2025-07-06 16:56:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-06 16:56:16 +0000 |
| commit | de031bbcb161b0b7fc0eb16f77b02ce9fbdf4c9e (patch) | |
| tree | 2f67f39a59825f5628e9f511f3c7e1fa6f847ab5 /compiler/rustc_hir_analysis/src | |
| parent | 3c95364c4afc3f15749f5a511d599af086f5456e (diff) | |
| parent | bff79a75172b5f8200b4f30264e5fc9d36f8080e (diff) | |
| download | rust-de031bbcb161b0b7fc0eb16f77b02ce9fbdf4c9e.tar.gz rust-de031bbcb161b0b7fc0eb16f77b02ce9fbdf4c9e.zip | |
Auto merge of #143526 - matthiaskrgr:rollup-pm69g5v, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - rust-lang/rust#143252 (Rewrite empty attribute lint for new attribute parser) - rust-lang/rust#143492 (Use `object` crate from crates.io to fix windows build error) - rust-lang/rust#143514 (Organize macro tests a bit more) - rust-lang/rust#143518 (rustc_builtin_macros: Make sure registered attributes stay sorted) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/check.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index f4fcb13b1a1..bd89d010a3c 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -1395,8 +1395,7 @@ fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) { pub(super) fn check_packed(tcx: TyCtxt<'_>, sp: Span, def: ty::AdtDef<'_>) { let repr = def.repr(); if repr.packed() { - if let Some(reprs) = - attrs::find_attr!(tcx.get_all_attrs(def.did()), attrs::AttributeKind::Repr(r) => r) + if let Some(reprs) = attrs::find_attr!(tcx.get_all_attrs(def.did()), attrs::AttributeKind::Repr { reprs, .. } => reprs) { for (r, _) in reprs { if let ReprPacked(pack) = r @@ -1619,10 +1618,10 @@ fn check_enum(tcx: TyCtxt<'_>, def_id: LocalDefId) { if def.variants().is_empty() { attrs::find_attr!( tcx.get_all_attrs(def_id), - attrs::AttributeKind::Repr(rs) => { + attrs::AttributeKind::Repr { reprs, first_span } => { struct_span_code_err!( tcx.dcx(), - rs.first().unwrap().1, + reprs.first().map(|repr| repr.1).unwrap_or(*first_span), E0084, "unsupported representation for zero-variant enum" ) |
