Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3679,11 +3679,11 @@ dependencies = [
"rustc_abi",
"rustc_ast",
"rustc_ast_pretty",
"rustc_attr_ir",
"rustc_attr_parsing",
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_hir",
"rustc_macros",
"rustc_session",
"rustc_span",
Expand Down Expand Up @@ -3725,10 +3725,10 @@ dependencies = [
"rustc_abi",
"rustc_ast",
"rustc_ast_pretty",
"rustc_attr_ir",
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_hir",
"rustc_lexer",
"rustc_lint_defs",
"rustc_macros",
Expand Down Expand Up @@ -3781,12 +3781,12 @@ version = "0.0.0"
dependencies = [
"rustc_ast",
"rustc_ast_pretty",
"rustc_attr_ir",
"rustc_attr_parsing",
"rustc_data_structures",
"rustc_errors",
"rustc_expand",
"rustc_feature",
"rustc_hir",
"rustc_index",
"rustc_lexer",
"rustc_lint_defs",
Expand Down Expand Up @@ -4037,6 +4037,7 @@ dependencies = [
"rustc_ast",
"rustc_ast_passes",
"rustc_ast_pretty",
"rustc_attr_ir",
"rustc_attr_parsing",
"rustc_data_structures",
"rustc_errors",
Expand Down Expand Up @@ -4746,6 +4747,7 @@ dependencies = [
"libc",
"rustc_abi",
"rustc_ast",
"rustc_attr_ir",
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ itertools = "0.15"
rustc_abi = { path = "../rustc_abi" }
rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_attr_ir = { path = "../rustc_attr_ir" }
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_feature = { path = "../rustc_feature" }
rustc_hir = { path = "../rustc_hir" }
rustc_macros = { path = "../rustc_macros" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use rustc_ast::visit::{self, AssocCtxt, FnKind, Visitor};
use rustc_ast::{self as ast, AttrVec, GenericBound, NodeId, PatKind, attr, token};
use rustc_attr_ir::{Attribute, AttributeKind};
use rustc_attr_parsing::AttributeParser;
use rustc_errors::msg;
use rustc_feature::Features;
use rustc_hir::Attribute;
use rustc_hir::attrs::AttributeKind;
use rustc_session::Session;
use rustc_session::diagnostics::{feature_err, feature_warn};
use rustc_span::{Span, Spanned, Symbol, sym};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ edition = "2024"
rustc_abi = { path = "../rustc_abi" }
rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_attr_ir = { path = "../rustc_attr_ir" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_feature = { path = "../rustc_feature" }
rustc_hir = { path = "../rustc_hir" }
rustc_lexer = { path = "../rustc_lexer" }
rustc_lint_defs = { path = "../rustc_lint_defs" }
rustc_macros = { path = "../rustc_macros" }
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/autodiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::str::FromStr;

use rustc_ast::LitKind;
use rustc_ast::expand::autodiff_attrs::{DiffActivity, DiffMode};
use rustc_attr_ir::target::{MethodKind, Target};
use rustc_attr_ir::{AttributeKind, RustcAutodiff};
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{AttributeKind, RustcAutodiff};
use rustc_hir::{MethodKind, Target};
use rustc_span::{Symbol, sym};
use thin_vec::ThinVec;

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use std::convert::identity;
use rustc_ast::token::Delimiter;
use rustc_ast::tokenstream::{DelimSpan, WithTokens};
use rustc_ast::{AttrItem, Attribute, LitKind, ast, token};
use rustc_attr_ir::target::Target;
use rustc_attr_ir::{AttrPath, CfgEntry, RustcVersion};
use rustc_errors::{Applicability, Diagnostic, PResult, msg};
use rustc_feature::{Features, GatedCfg, find_gated_cfg};
use rustc_hir::attrs::{CfgEntry, RustcVersion};
use rustc_hir::{AttrPath, Target};
use rustc_parse::parser::{ForceCollect, Parser, Recovery};
use rustc_parse::{exp, parse_in};
use rustc_session::Session;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/cfg_select.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use rustc_ast::token::Token;
use rustc_ast::tokenstream::TokenStream;
use rustc_ast::{AttrStyle, NodeId, token};
use rustc_attr_ir::target::Target;
use rustc_attr_ir::{AttrPath, CfgEntry};
use rustc_data_structures::fx::FxHashMap;
use rustc_errors::{Diagnostic, MultiSpan};
use rustc_feature::Features;
use rustc_hir::attrs::CfgEntry;
use rustc_hir::{AttrPath, Target};
use rustc_parse::exp;
use rustc_parse::parser::{Parser, Recovery};
use rustc_session::Session;
Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{
CoverageAttrKind, InstrumentFnAttr, OptimizeAttr, RtsanSetting, SanitizerSet, UsedBy,
use rustc_attr_ir::{
CoverageAttrKind, InstrumentFnAttr, OptimizeAttr, RtsanSetting, SanitizerSet, UsedBy, find_attr,
};
use rustc_hir::find_attr;
use rustc_feature::AttributeStability;
use rustc_session::diagnostics::feature_err;
use rustc_span::edition::Edition::Edition2024;

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/crate_level.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_attr_ir::{CrateType, WindowsSubsystemKind};
use rustc_data_structures::fx::FxIndexSet;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{CrateType, WindowsSubsystemKind};
use rustc_session::lint::builtin::{DUPLICATE_TOOLS, UNKNOWN_CRATE_TYPES};
use rustc_span::Symbol;
use rustc_span::edit_distance::find_best_match_for_name_with_substrings;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/debugger.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_attr_ir::{DebugVisualizer, DebuggerVisualizerType};
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{DebugVisualizer, DebuggerVisualizerType};

use super::prelude::*;

Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_attr_parsing/src/attributes/deprecation.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use rustc_ast::LitKind;
use rustc_attr_ir::{DeprecatedSince, Deprecation, RustcVersion, VERSION_PLACEHOLDER};
use rustc_feature::AttributeStability;
use rustc_hir::VERSION_PLACEHOLDER;
use rustc_hir::attrs::{DeprecatedSince, Deprecation, RustcVersion};

use super::prelude::*;
use super::util::parse_version;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_attr_ir::AttributeKind;
use rustc_attr_ir::target::Target;
use rustc_feature::AttributeStability;
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_session::lint::builtin::MALFORMED_DIAGNOSTIC_ATTRIBUTES;
use rustc_span::{Symbol, sym};

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/diagnostic/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::ops::Range;

use rustc_ast::PathSegment;
use rustc_errors::{Diagnostic, MultiSpan};
use rustc_hir::attrs::diagnostic::{
use rustc_attr_ir::diagnostic::{
Directive, Filter, FilterFormatString, Flag, FormatArg, FormatString, LitOrArg, Name,
NameValue, Piece, Predicate,
};
use rustc_errors::{Diagnostic, MultiSpan};
use rustc_lint_defs::LintId;
use rustc_parse_format::{
Argument, FormatSpec, ParseError, ParseMode, Parser, Piece as RpfPiece, Position,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_attr_ir::diagnostic::Directive;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::diagnostic::Directive;

use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_attr_ir::AttributeKind;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::AttributeKind;
use rustc_span::sym;

use crate::attributes::diagnostic::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rustc_hir::attrs::AttributeKind;
use rustc_attr_ir::AttributeKind;
use rustc_span::sym;

use crate::attributes::AttributeStability;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_attr_ir::diagnostic::Directive;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::diagnostic::Directive;

use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_attr_ir::diagnostic::Directive;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::diagnostic::Directive;

use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_attr_ir::diagnostic::Directive;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::diagnostic::Directive;

use crate::attributes::diagnostic::*;
use crate::attributes::prelude::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_attr_ir::AttributeKind;
use rustc_attr_ir::target::Target;
use rustc_feature::AttributeStability;
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_session::lint::builtin::MALFORMED_DIAGNOSTIC_ATTRIBUTES;
use rustc_span::{Span, sym};

Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_attr_parsing/src/attributes/doc.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use rustc_ast::ast::{AttrStyle, LitKind, MetaItemLit};
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, IndexEntry};
use rustc_errors::{Applicability, msg};
use rustc_feature::AttributeStability;
use rustc_hir::Target;
use rustc_hir::attrs::{
use rustc_attr_ir::target::Target;
use rustc_attr_ir::{
AttributeKind, CfgEntry, CfgHideShow, DocAttribute, DocCfgHideShow, DocCfgHideShowValue,
DocInline, HideOrShow,
};
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, IndexEntry};
use rustc_errors::{Applicability, msg};
use rustc_feature::AttributeStability;
use rustc_session::diagnostics::feature_err;
use rustc_span::{Span, Symbol, edition, sym};

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/dummy.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_attr_ir::AttributeKind;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::AttributeKind;
use rustc_span::{Symbol, sym};

use crate::attributes::{OnDuplicate, SingleAttributeParser};
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_attr_parsing/src/attributes/inline.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use rustc_attr_ir::{AttributeKind, InlineAttr, find_attr};
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{AttributeKind, InlineAttr};
use rustc_hir::find_attr;
use rustc_session::lint::builtin::ILL_FORMED_ATTRIBUTE_INPUT;

use super::prelude::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_attr_ir::InstructionSetAttr;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::InstructionSetAttr;

use super::prelude::*;
use crate::diagnostics;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/link_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rustc_attr_ir::AttributeKind::{LinkName, LinkOrdinal, LinkSection};
use rustc_attr_ir::*;
use rustc_errors::msg;
use rustc_feature::{AttributeStability, Features};
use rustc_hir::attrs::AttributeKind::{LinkName, LinkOrdinal, LinkSection};
use rustc_hir::attrs::*;
use rustc_session::Session;
use rustc_session::diagnostics::feature_err;
use rustc_session::lint::builtin::ILL_FORMED_ATTRIBUTE_INPUT;
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_attr_parsing/src/attributes/lint_helpers.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use rustc_attr_ir::{ReprAttr, find_attr};
use rustc_feature::AttributeStability;
use rustc_hir::attrs::ReprAttr;
use rustc_hir::find_attr;

use super::prelude::*;
use crate::diagnostics::RustcPubTransparent;
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_attr_parsing/src/attributes/macro_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use rustc_attr_ir::{CollapseMacroDebuginfo, MacroUseArgs, find_attr};
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{CollapseMacroDebuginfo, MacroUseArgs};
use rustc_hir::find_attr;
use rustc_session::lint::builtin::INVALID_MACRO_EXPORT_ARGUMENTS;

use super::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

use std::marker::PhantomData;

use rustc_attr_ir::AttributeKind;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::AttributeKind;
use rustc_span::edition::Edition;
use rustc_span::{Span, Symbol};
use thin_vec::ThinVec;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/non_exhaustive.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_attr_ir::AttributeKind;
use rustc_attr_ir::target::Target;
use rustc_feature::AttributeStability;
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_span::{Span, Symbol, sym};

use crate::attributes::{NoArgsAttributeParser, OnDuplicate};
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/pin_v2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_attr_ir::AttributeKind;
use rustc_attr_ir::target::Target;
use rustc_feature::AttributeStability;
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_span::{Span, Symbol, sym};

use crate::attributes::NoArgsAttributeParser;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// data structures
#[doc(hidden)]
pub(super) use rustc_hir::attrs::AttributeKind;
pub(super) use rustc_attr_ir::AttributeKind;
#[doc(hidden)]
pub(super) use rustc_hir::{MethodKind, Target};
pub(super) use rustc_attr_ir::target::{MethodKind, Target};
#[doc(hidden)]
pub(super) use rustc_span::{Ident, Span, Symbol, sym};
#[doc(hidden)]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/prototype.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Attributes that are only used on function prototypes.

use rustc_attr_ir::target::Target;
use rustc_attr_ir::{AttributeKind, MirDialect, MirPhase};
use rustc_feature::AttributeStability;
use rustc_hir::Target;
use rustc_hir::attrs::{AttributeKind, MirDialect, MirPhase};
use rustc_span::{Span, Symbol, sym};

use crate::attributes::SingleAttributeParser;
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_attr_parsing/src/attributes/repr.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use rustc_abi::{Align, Size};
use rustc_ast::{IntTy, LitIntType, LitKind, UintTy};
use rustc_attr_ir::IntType::{SignedInt, UnsignedInt};
use rustc_attr_ir::ReprAttr;
use rustc_feature::AttributeStability;
use rustc_hir::attrs::IntType::{SignedInt, UnsignedInt};
use rustc_hir::attrs::ReprAttr;
use rustc_session::diagnostics::feature_err;

use super::prelude::*;
Expand Down Expand Up @@ -161,7 +161,7 @@ fn parse_repr(cx: &mut AcceptContext<'_, '_>, param: &MetaItemParser) -> Option<
&AllowedTargets::AllowList(&[
Allow(Target::Struct),
Allow(Target::Enum),
Allow(Target::Union), // Feature gated in `rustc_hir_analysis`
Allow(Target::Union), // Feature gated in `rustc_attr_ir_analysis`
Warn(Target::MacroCall),
]),
);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/rustc_dump.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_attr_ir::target::{MethodKind, Target};
use rustc_attr_ir::{AttributeKind, RustcDumpLayoutKind};
use rustc_feature::AttributeStability;
use rustc_hir::attrs::{AttributeKind, RustcDumpLayoutKind};
use rustc_hir::{MethodKind, Target};
use rustc_span::{Span, Symbol, sym};

use super::prelude::*;
Expand Down
Loading
Loading