diff options
| author | mejrs <59372212+mejrs@users.noreply.github.com> | 2025-05-09 23:16:55 +0200 |
|---|---|---|
| committer | mejrs <59372212+mejrs@users.noreply.github.com> | 2025-05-09 23:16:55 +0200 |
| commit | 684b7b70f4940a0abfecd3d95fe339960d6048d4 (patch) | |
| tree | da16f12b248a607bdef10265f57af23f1c0db590 /compiler/rustc_hir_analysis | |
| parent | dcecb99176edf2eec51613730937d21cdd5c8f6e (diff) | |
| download | rust-684b7b70f4940a0abfecd3d95fe339960d6048d4.tar.gz rust-684b7b70f4940a0abfecd3d95fe339960d6048d4.zip | |
don't depend on rustc_attr_parsing if rustc_data_structures will do
Diffstat (limited to 'compiler/rustc_hir_analysis')
| -rw-r--r-- | compiler/rustc_hir_analysis/Cargo.toml | 2 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/check.rs | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/compiler/rustc_hir_analysis/Cargo.toml b/compiler/rustc_hir_analysis/Cargo.toml index 58213c4f4e4..f2b82c679b9 100644 --- a/compiler/rustc_hir_analysis/Cargo.toml +++ b/compiler/rustc_hir_analysis/Cargo.toml @@ -13,7 +13,7 @@ itertools = "0.12" rustc_abi = { path = "../rustc_abi" } rustc_arena = { path = "../rustc_arena" } rustc_ast = { path = "../rustc_ast" } -rustc_attr_parsing = { path = "../rustc_attr_parsing" } +rustc_attr_data_structures = { path = "../rustc_attr_data_structures" } rustc_data_structures = { path = "../rustc_data_structures" } rustc_errors = { path = "../rustc_errors" } rustc_feature = { path = "../rustc_feature" } diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index f92b2aea160..17628de2e8d 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -2,8 +2,7 @@ use std::cell::LazyCell; use std::ops::ControlFlow; use rustc_abi::FieldIdx; -use rustc_attr_parsing::AttributeKind; -use rustc_attr_parsing::ReprAttr::ReprPacked; +use rustc_attr_data_structures::ReprAttr::ReprPacked; use rustc_data_structures::unord::{UnordMap, UnordSet}; use rustc_errors::MultiSpan; use rustc_errors::codes::*; @@ -31,7 +30,7 @@ use rustc_trait_selection::traits; use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt; use tracing::{debug, instrument}; use ty::TypingMode; -use {rustc_attr_parsing as attr, rustc_hir as hir}; +use {rustc_attr_data_structures as attrs, rustc_hir as hir}; use super::compare_impl_item::check_type_bounds; use super::*; @@ -1154,7 +1153,7 @@ pub(super) fn check_packed(tcx: TyCtxt<'_>, sp: Span, def: ty::AdtDef<'_>) { let repr = def.repr(); if repr.packed() { if let Some(reprs) = - attr::find_attr!(tcx.get_all_attrs(def.did()), AttributeKind::Repr(r) => r) + attrs::find_attr!(tcx.get_all_attrs(def.did()), attrs::AttributeKind::Repr(r) => r) { for (r, _) in reprs { if let ReprPacked(pack) = r @@ -1371,9 +1370,9 @@ fn check_enum(tcx: TyCtxt<'_>, def_id: LocalDefId) { def.destructor(tcx); // force the destructor to be evaluated if def.variants().is_empty() { - attr::find_attr!( + attrs::find_attr!( tcx.get_all_attrs(def_id), - AttributeKind::Repr(rs) => { + attrs::AttributeKind::Repr(rs) => { struct_span_code_err!( tcx.dcx(), rs.first().unwrap().1, |
