Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2e36598
Stabilize `core::hint::cold_path`
tgross35 Jan 24, 2026
3a48b9f
Stabilize `atomic_try_update`
GrigorenkoPV Nov 6, 2025
b29a9b6
Move `rustc_query_system::cache` to `rustc_middle::traits`.
nnethercote Feb 7, 2026
b49ab57
Rename `Cache` as `WithDepNodeCache`.
nnethercote Feb 7, 2026
d2020fb
stabilize new inclusive range type and iter
pitaj Dec 30, 2025
d837cf6
feat: Implement `int_from_ascii` for `NonZero<T>`
sorairolake Feb 7, 2026
cd50e62
Linker-plugin-based LTO: Give explanation how to use linker-plugin-lt…
foxtran Feb 1, 2026
f71347c
Remove tidy fluent file checks
JonathanBrouwer Feb 6, 2026
ca9c227
Check style of messages in `rustc_macros`
JonathanBrouwer Feb 6, 2026
1d45191
Port rustc_intrinsic to the new attribute parser
jdonszelmann Feb 5, 2026
edd43c9
Fix existing messages in the diag structs
JonathanBrouwer Feb 6, 2026
c1091da
Fix existing messages in stderrs
JonathanBrouwer Feb 6, 2026
2f214f4
Parse #[rustc_delayed_bug_from_inside_query]
Ozzy1423 Feb 4, 2026
fa91a4d
Parse #[rustc_evaluate_where_clauses]
Ozzy1423 Feb 4, 2026
c6f4bcf
Parse #[rustc_outlives]
Ozzy1423 Feb 4, 2026
593d354
Port rustc_intrinsic_const_stable_indirect to the new attribute parser
jdonszelmann Feb 5, 2026
9a114c6
Convert to inline diagnostics in `rustc_parse`
JonathanBrouwer Feb 6, 2026
cda9b8c
Split `ComparisonOrShiftInterpretedAsGenericSugg`
JonathanBrouwer Feb 6, 2026
c5587ca
Split `parse_inner_attr` errors by case
JonathanBrouwer Feb 6, 2026
0ef518c
Disable the `run-make/translation` test for now
JonathanBrouwer Feb 6, 2026
00dd7db
Allow more capitalized words
JonathanBrouwer Feb 7, 2026
80b44f6
Rollup merge of #148590 - GrigorenkoPV:atomic_try_update, r=jhpratt
JonathanBrouwer Feb 7, 2026
19e6e5b
Rollup merge of #150522 - pitaj:stabilize-new-rangeinclusive, r=tgross35
JonathanBrouwer Feb 7, 2026
c600797
Rollup merge of #152235 - JonathanBrouwer:convert_parse, r=JonathanBr…
JonathanBrouwer Feb 7, 2026
4769191
Rollup merge of #152267 - sorairolake:feature/nonzero-from-ascii, r=d…
JonathanBrouwer Feb 7, 2026
330a7f3
Rollup merge of #151576 - tgross35:stabilize-cold-path, r=jhpratt
JonathanBrouwer Feb 7, 2026
7525cf2
Rollup merge of #151933 - foxtran:doc/linker-plugin-lto-full-lto, r=n…
JonathanBrouwer Feb 7, 2026
23d3915
Rollup merge of #152168 - jdonszelmann:port-rustc-intrinsic-const-sta…
JonathanBrouwer Feb 7, 2026
61af199
Rollup merge of #152199 - nnethercote:rm-rustc_query_system-cache, r=…
JonathanBrouwer Feb 7, 2026
7d16363
Rollup merge of #152212 - Ozzy1423:three-attrs, r=JonathanBrouwer
JonathanBrouwer Feb 7, 2026
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
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4381,7 +4381,6 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_fluent_macro",
"rustc_index",
"rustc_lexer",
"rustc_macros",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
// create a fake body so that the entire rest of the compiler doesn't have to deal with
// this as a special case.
return self.lower_fn_body(decl, contract, |this| {
if attrs.iter().any(|a| a.has_name(sym::rustc_intrinsic))
if find_attr!(attrs, AttributeKind::RustcIntrinsic)
|| this.tcx.is_sdylib_interface_build()
{
let span = this.lower_span(span);
Expand Down
19 changes: 19 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ impl<S: Stage> CombineAttributeParser<S> for RustcMirParser {
.collect()
}
}

pub(crate) struct RustcNonConstTraitMethodParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcNonConstTraitMethodParser {
Expand Down Expand Up @@ -760,3 +761,21 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcEffectiveVisibilityParser {
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcEffectiveVisibility;
}

pub(crate) struct RustcIntrinsicParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcIntrinsicParser {
const PATH: &'static [Symbol] = &[sym::rustc_intrinsic];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Fn)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcIntrinsic;
}

pub(crate) struct RustcIntrinsicConstStableIndirectParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcIntrinsicConstStableIndirectParser {
const PATH: &'static [Symbol] = &[sym::rustc_intrinsic_const_stable_indirect];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Fn)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcIntrinsicConstStableIndirect;
}
38 changes: 38 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/test_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,41 @@ impl<S: Stage> SingleAttributeParser<S> for RustcAbiParser {
Some(AttributeKind::RustcAbi { attr_span: cx.attr_span, kind })
}
}

pub(crate) struct RustcDelayedBugFromInsideQueryParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcDelayedBugFromInsideQueryParser {
const PATH: &[Symbol] = &[sym::rustc_delayed_bug_from_inside_query];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Fn)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDelayedBugFromInsideQuery;
}

pub(crate) struct RustcEvaluateWhereClausesParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcEvaluateWhereClausesParser {
const PATH: &[Symbol] = &[sym::rustc_evaluate_where_clauses];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Allow(Target::Method(MethodKind::Inherent)),
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
Allow(Target::Method(MethodKind::Trait { body: false })),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcEvaluateWhereClauses;
}

pub(crate) struct RustcOutlivesParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcOutlivesParser {
const PATH: &[Symbol] = &[sym::rustc_outlives];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Struct),
Allow(Target::Enum),
Allow(Target::Union),
Allow(Target::TyAlias),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcOutlives;
}
5 changes: 5 additions & 0 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,18 @@ attribute_parsers!(
Single<WithoutArgs<RustcAllocatorZeroedParser>>,
Single<WithoutArgs<RustcCoherenceIsCoreParser>>,
Single<WithoutArgs<RustcDeallocatorParser>>,
Single<WithoutArgs<RustcDelayedBugFromInsideQueryParser>>,
Single<WithoutArgs<RustcDumpDefParentsParser>>,
Single<WithoutArgs<RustcDumpItemBoundsParser>>,
Single<WithoutArgs<RustcDumpPredicatesParser>>,
Single<WithoutArgs<RustcDumpUserArgsParser>>,
Single<WithoutArgs<RustcDumpVtableParser>>,
Single<WithoutArgs<RustcEffectiveVisibilityParser>>,
Single<WithoutArgs<RustcEvaluateWhereClausesParser>>,
Single<WithoutArgs<RustcHasIncoherentInherentImplsParser>>,
Single<WithoutArgs<RustcHiddenTypeOfOpaquesParser>>,
Single<WithoutArgs<RustcIntrinsicConstStableIndirectParser>>,
Single<WithoutArgs<RustcIntrinsicParser>>,
Single<WithoutArgs<RustcLintOptTyParser>>,
Single<WithoutArgs<RustcLintQueryInstabilityParser>>,
Single<WithoutArgs<RustcLintUntrackedQueryInformationParser>>,
Expand All @@ -271,6 +275,7 @@ attribute_parsers!(
Single<WithoutArgs<RustcNonConstTraitMethodParser>>,
Single<WithoutArgs<RustcNounwindParser>>,
Single<WithoutArgs<RustcOffloadKernelParser>>,
Single<WithoutArgs<RustcOutlivesParser>>,
Single<WithoutArgs<RustcPassIndirectlyInNonRusticAbisParser>>,
Single<WithoutArgs<RustcPreserveUbChecksParser>>,
Single<WithoutArgs<RustcReallocatorParser>>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,5 @@ pub(crate) struct FixedX18InvalidArch<'a> {
}

#[derive(Diagnostic)]
#[diag("`-Zsanitizer-kcfi-arity` requires LLVM 21.0.0 or later.")]
#[diag("`-Zsanitizer-kcfi-arity` requires LLVM 21.0.0 or later")]
pub(crate) struct SanitizerKcfiArityRequiresLLVM2100;
10 changes: 5 additions & 5 deletions compiler/rustc_codegen_ssa/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub(crate) struct MissingQueryDepGraph {

#[derive(Diagnostic)]
#[diag(
"found malformed codegen unit name `{$user_path}`. codegen units names must always start with the name of the crate (`{$crate_name}` in this case)."
"found malformed codegen unit name `{$user_path}`. codegen units names must always start with the name of the crate (`{$crate_name}` in this case)"
)]
pub(crate) struct MalformedCguName {
#[primary_span]
Expand Down Expand Up @@ -562,12 +562,12 @@ pub(crate) struct SelfContainedLinkerMissing;

#[derive(Diagnostic)]
#[diag(
"please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option."
"please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option"
)]
pub(crate) struct CheckInstalledVisualStudio;

#[derive(Diagnostic)]
#[diag("VS Code is a different product, and is not sufficient.")]
#[diag("VS Code is a different product, and is not sufficient")]
pub(crate) struct InsufficientVSCodeProduct;

#[derive(Diagnostic)]
Expand Down Expand Up @@ -610,13 +610,13 @@ pub(crate) struct LinkerFileStem;

#[derive(Diagnostic)]
#[diag(
"link against the following native artifacts when linking against this static library. The order and any duplication can be significant on some platforms."
"link against the following native artifacts when linking against this static library. The order and any duplication can be significant on some platforms"
)]
pub(crate) struct StaticLibraryNativeArtifacts;

#[derive(Diagnostic)]
#[diag(
"native artifacts to link against have been written to {$path}. The order and any duplication can be significant on some platforms."
"native artifacts to link against have been written to {$path}. The order and any duplication can be significant on some platforms"
)]
pub(crate) struct StaticLibraryNativeArtifactsToFile<'a> {
pub path: &'a Path,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_const_eval/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ pub(crate) struct UnallowedHeapAllocations {
pub span: Span,
pub kind: ConstContext,
#[note(
"The runtime heap is not yet available at compile-time, so no runtime heap allocations can be created."
"the runtime heap is not yet available at compile-time, so no runtime heap allocations can be created"
)]
pub teach: bool,
}
Expand Down Expand Up @@ -347,7 +347,7 @@ pub(crate) struct InteriorMutableBorrowEscaping {
#[diag("constant evaluation is taking a long time")]
#[note(
"this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
If your compilation actually takes a long time, you can safely allow the lint."
If your compilation actually takes a long time, you can safely allow the lint"
)]
pub struct LongRunning {
#[help("the constant being evaluated")]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ pub fn default_translator() -> Translator {
pub static DEFAULT_LOCALE_RESOURCES: &[&str] = &[
// tidy-alphabetical-start
rustc_lint::DEFAULT_LOCALE_RESOURCE,
rustc_parse::DEFAULT_LOCALE_RESOURCE,
// tidy-alphabetical-end
];

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_driver_impl/src/session_diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub(crate) struct RlinkCorruptFile<'a> {
}

#[derive(Diagnostic)]
#[diag("the compiler unexpectedly panicked. this is a bug.")]
#[diag("the compiler unexpectedly panicked. This is a bug")]
pub(crate) struct Ice;

#[derive(Diagnostic)]
Expand Down
15 changes: 15 additions & 0 deletions compiler/rustc_hir/src/attrs/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,9 @@ pub enum AttributeKind {
/// Represents `#[rustc_deallocator]`
RustcDeallocator,

/// Represents `#[rustc_delayed_bug_from_inside_query]`
RustcDelayedBugFromInsideQuery,

/// Represents `#[rustc_deny_explicit_impl]`.
RustcDenyExplicitImpl(Span),

Expand Down Expand Up @@ -1108,6 +1111,9 @@ pub enum AttributeKind {
/// Represents `#[rustc_effective_visibility]`.
RustcEffectiveVisibility,

/// Represents `#[rustc_evaluate_where_clauses]`
RustcEvaluateWhereClauses,

/// Represents `#[rustc_has_incoherent_inherent_impls]`
RustcHasIncoherentInherentImpls,

Expand All @@ -1117,6 +1123,12 @@ pub enum AttributeKind {
/// Represents `#[rustc_if_this_changed]`
RustcIfThisChanged(Span, Option<Symbol>),

/// Represents `#[rustc_intrinsic]`
RustcIntrinsic,

/// Represents `#[rustc_intrinsic_const_stable_indirect]`
RustcIntrinsicConstStableIndirect,

/// Represents `#[rustc_layout]`
RustcLayout(ThinVec<RustcLayoutType>),

Expand Down Expand Up @@ -1177,6 +1189,9 @@ pub enum AttributeKind {
/// Represents `#[rustc_offload_kernel]`
RustcOffloadKernel,

/// Represents `#[rustc_outlives]`
RustcOutlives,

/// Represents `#[rustc_paren_sugar]`.
RustcParenSugar(Span),

Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_hir/src/attrs/encode_cross_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ impl AttributeKind {
RustcConstStability { .. } => Yes,
RustcConstStabilityIndirect => No,
RustcDeallocator => No,
RustcDelayedBugFromInsideQuery => No,
RustcDenyExplicitImpl(..) => No,
RustcDummy => No,
RustcDumpDefParents => No,
Expand All @@ -114,9 +115,12 @@ impl AttributeKind {
RustcDumpVtable(..) => No,
RustcDynIncompatibleTrait(..) => No,
RustcEffectiveVisibility => Yes,
RustcEvaluateWhereClauses => Yes,
RustcHasIncoherentInherentImpls => Yes,
RustcHiddenTypeOfOpaques => No,
RustcIfThisChanged(..) => No,
RustcIntrinsic => Yes,
RustcIntrinsicConstStableIndirect => No,
RustcLayout(..) => No,
RustcLayoutScalarValidRangeEnd(..) => Yes,
RustcLayoutScalarValidRangeStart(..) => Yes,
Expand All @@ -137,6 +141,7 @@ impl AttributeKind {
RustcObjcSelector { .. } => No,
RustcObjectLifetimeDefault => No,
RustcOffloadKernel => Yes,
RustcOutlives => No,
RustcParenSugar(..) => No,
RustcPassByValue(..) => Yes,
RustcPassIndirectlyInNonRusticAbis(..) => No,
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_hir_analysis/src/outlives/dump.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use rustc_hir::attrs::AttributeKind;
use rustc_hir::find_attr;
use rustc_middle::bug;
use rustc_middle::ty::{self, TyCtxt};
use rustc_span::sym;

pub(crate) fn inferred_outlives(tcx: TyCtxt<'_>) {
for id in tcx.hir_free_items() {
if !tcx.has_attr(id.owner_id, sym::rustc_outlives) {
if !find_attr!(tcx.get_all_attrs(id.owner_id), AttributeKind::RustcOutlives) {
continue;
}

Expand Down
8 changes: 6 additions & 2 deletions compiler/rustc_hir_typeck/src/callee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ use std::iter;
use rustc_abi::{CanonAbi, ExternAbi};
use rustc_ast::util::parser::ExprPrecedence;
use rustc_errors::{Applicability, Diag, ErrorGuaranteed, StashKey, inline_fluent};
use rustc_hir::attrs::AttributeKind;
use rustc_hir::def::{self, CtorKind, Namespace, Res};
use rustc_hir::def_id::DefId;
use rustc_hir::{self as hir, HirId, LangItem};
use rustc_hir::{self as hir, HirId, LangItem, find_attr};
use rustc_hir_analysis::autoderef::Autoderef;
use rustc_infer::infer::BoundRegionConversionTime;
use rustc_infer::traits::{Obligation, ObligationCause, ObligationCauseCode};
Expand Down Expand Up @@ -526,7 +527,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// `#[rustc_evaluate_where_clauses]` trigger special output
// to let us test the trait evaluation system.
if self.has_rustc_attrs
&& self.tcx.has_attr(def_id, sym::rustc_evaluate_where_clauses)
&& find_attr!(
self.tcx.get_all_attrs(def_id),
AttributeKind::RustcEvaluateWhereClauses
)
{
let predicates = self.tcx.predicates_of(def_id);
let predicates = predicates.instantiate(self.tcx, args);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ pub(crate) struct CastThinPointerToWidePointer<'tcx> {
pub expr_ty: Ty<'tcx>,
pub cast_ty: Ty<'tcx>,
#[note(
"Thin pointers are \"simple\" pointers: they are purely a reference to a
"thin pointers are \"simple\" pointers: they are purely a reference to a
memory address.
Wide pointers are pointers referencing \"Dynamically Sized Types\" (also
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_incremental/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ pub(crate) struct DeleteWorkProduct<'a> {

#[derive(Diagnostic)]
#[diag(
"corrupt incremental compilation artifact found at `{$path}`. This file will automatically be ignored and deleted. If you see this message repeatedly or can provoke it without manually manipulating the compiler's artifacts, please file an issue. The incremental compilation system relies on hardlinks and filesystem locks behaving correctly, and may not deal well with OS crashes, so whatever information you can provide about your filesystem or other state may be very relevant."
"corrupt incremental compilation artifact found at `{$path}`. This file will automatically be ignored and deleted. If you see this message repeatedly or can provoke it without manually manipulating the compiler's artifacts, please file an issue. The incremental compilation system relies on hardlinks and filesystem locks behaving correctly, and may not deal well with OS crashes, so whatever information you can provide about your filesystem or other state may be very relevant"
)]
pub(crate) struct CorruptFile<'a> {
pub path: &'a Path,
Expand Down
14 changes: 6 additions & 8 deletions compiler/rustc_interface/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ pub struct Compiler {
pub(crate) fn parse_cfg(dcx: DiagCtxtHandle<'_>, cfgs: Vec<String>) -> Cfg {
cfgs.into_iter()
.map(|s| {
let psess = ParseSess::emitter_with_note(
vec![rustc_parse::DEFAULT_LOCALE_RESOURCE],
format!("this occurred on the command line: `--cfg={s}`"),
);
let psess = ParseSess::emitter_with_note(format!(
"this occurred on the command line: `--cfg={s}`"
));
let filename = FileName::cfg_spec_source_code(&s);

macro_rules! error {
Expand Down Expand Up @@ -125,10 +124,9 @@ pub(crate) fn parse_check_cfg(dcx: DiagCtxtHandle<'_>, specs: Vec<String>) -> Ch
let mut check_cfg = CheckCfg { exhaustive_names, exhaustive_values, ..CheckCfg::default() };

for s in specs {
let psess = ParseSess::emitter_with_note(
vec![rustc_parse::DEFAULT_LOCALE_RESOURCE],
format!("this occurred on the command line: `--check-cfg={s}`"),
);
let psess = ParseSess::emitter_with_note(format!(
"this occurred on the command line: `--check-cfg={s}`"
));
let filename = FileName::cfg_spec_source_code(&s);

const VISIT: &str =
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_interface/src/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ use rustc_errors::timings::TimingSection;
use rustc_expand::base::{ExtCtxt, LintStoreExpand};
use rustc_feature::Features;
use rustc_fs_util::try_canonicalize;
use rustc_hir::Attribute;
use rustc_hir::attrs::AttributeKind;
use rustc_hir::def_id::{LOCAL_CRATE, StableCrateId, StableCrateIdMap};
use rustc_hir::definitions::Definitions;
use rustc_hir::limit::Limit;
use rustc_hir::{Attribute, find_attr};
use rustc_incremental::setup_dep_graph;
use rustc_lint::{BufferedEarlyLint, EarlyCheckNode, LintStore, unerased_lint_store};
use rustc_metadata::EncodedMetadata;
Expand Down Expand Up @@ -1227,7 +1227,7 @@ pub(crate) fn start_codegen<'tcx>(

// Hook for tests.
if let Some((def_id, _)) = tcx.entry_fn(())
&& tcx.has_attr(def_id, sym::rustc_delayed_bug_from_inside_query)
&& find_attr!(tcx.get_all_attrs(def_id), AttributeKind::RustcDelayedBugFromInsideQuery)
{
tcx.ensure_ok().trigger_delayed_bug(def_id);
}
Expand Down
Loading
Loading