Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9014fda
Update link in suggestion for pinning self
Trivaxy Jan 1, 2026
2484cfe
ptr::replace: make calls on ZST null ptr not UB
RalfJung Nov 21, 2025
b13d69f
delete some very old trivial `Box` tests
cyrgani Feb 19, 2026
fe29f03
rustc_public: `pub(crate)` the fields that shouldn't be exposed
makai410 Feb 20, 2026
2b3a2da
mGCA: improve diag message with ogca
zedddie Feb 14, 2026
b9614b2
Fix relative path handling for --extern-html-root-url
arferreira Feb 23, 2026
b608343
implement debuginfo for unsafe binders
makai410 Feb 23, 2026
0da2c0c
Update src/librustdoc/clean/types.rs
arferreira Feb 23, 2026
93b9973
rustc_expand: improve diagnostics for non-repeatable metavars
Unique-Usman Feb 15, 2026
1b50859
feat: BTreeMap::merge implemented with into iterators only (similar t…
asder8215 Feb 2, 2026
24efac1
Optimized BTreeMap::merge using CursorMut
asder8215 Feb 10, 2026
cbdcfca
Swapped key comparisons to match lower_bound_mut, added FIXME comment…
asder8215 Feb 23, 2026
b3a41f2
Add test cases for intra-doc links
arferreira Feb 24, 2026
327f778
Migrate `rustc_privacy` to use `TyCtxt::emit_diag_node_span_lint`
GuillaumeGomez Feb 24, 2026
c53fbcd
Migrate `rustc_pattern_analysis` to use `TyCtxt::emit_diag_node_span_…
GuillaumeGomez Feb 24, 2026
b55f6e3
Migrate `rustc_lint` to use `TyCtxt::emit_diag_node_span_lint`
GuillaumeGomez Feb 24, 2026
d926c1b
Migrate `rustc_mir_build` to use `TyCtxt::emit_diag_node_span_lint`
GuillaumeGomez Feb 24, 2026
480aa4d
Migrate `rustc_mir_transform` to use `TyCtxt::emit_diag_node_span_lint`
GuillaumeGomez Feb 24, 2026
f02ce96
Migrate `rustc_monomorphize` to use `TyCtxt::emit_diag_node_span_lint`
GuillaumeGomez Feb 24, 2026
8f63c00
Migrate `rustc_passes` to use `TyCtxt::emit_diag_node_span_lint`
GuillaumeGomez Feb 24, 2026
1c6c0f7
Migrate `rustc_trait_selection` to use `TyCtxt::emit_diag_node_span_l…
GuillaumeGomez Feb 24, 2026
2bb3b01
Replace `TyCtxt::emit_node_span_lint` with `emit_diag_node_span_lint`
GuillaumeGomez Feb 24, 2026
8fa1fca
Apply new change from `lint_level` into `diag_lint_level`
GuillaumeGomez Feb 24, 2026
8971ad8
Fix attribute parser and kind names.
nnethercote Feb 24, 2026
f2f8743
Give a better error when updating a submodule fails
jyn514 Feb 24, 2026
651db87
Rollup merge of #149169 - RalfJung:replace-zst-null-ptr, r=Mark-Simul…
jhpratt Feb 25, 2026
5d3f80a
Rollup merge of #150562 - Trivaxy:poll-doc-patch, r=apiraino
jhpratt Feb 25, 2026
5c47d0b
Rollup merge of #152418 - asder8215:btreemap_merge_optimized, r=Mark-…
jhpratt Feb 25, 2026
35391c8
Rollup merge of #152679 - Unique-Usman:ua/decmacrounrepeatable, r=est…
jhpratt Feb 25, 2026
cc8a33a
Rollup merge of #152952 - zedddie:improve-diag, r=BoxyUwU
jhpratt Feb 25, 2026
10edd16
Rollup merge of #152977 - arferreira:fix-extern-html-relative-depth, …
jhpratt Feb 25, 2026
989efb8
Rollup merge of #153017 - makai410:di-unsafe-binder, r=wesleywiser
jhpratt Feb 25, 2026
2f44f61
Rollup merge of #152868 - cyrgani:no-trivial-box-tests, r=Kivooeo
jhpratt Feb 25, 2026
1cfac5b
Rollup merge of #152922 - makai410:rpub/priv-field, r=celinval
jhpratt Feb 25, 2026
9765a8b
Rollup merge of #153032 - nnethercote:fix-attribute-names, r=Jonathan…
jhpratt Feb 25, 2026
6929f76
Rollup merge of #153051 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer
jhpratt Feb 25, 2026
ec849ca
Rollup merge of #153060 - ferrocene:jyn/errors, r=jieyouxu
jhpratt Feb 25, 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
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ impl<S: Stage> CombineAttributeParser<S> for UnstableFeatureBoundParser {
}
}

pub(crate) struct AllowConstFnUnstableParser;
impl<S: Stage> CombineAttributeParser<S> for AllowConstFnUnstableParser {
pub(crate) struct RustcAllowConstFnUnstableParser;
impl<S: Stage> CombineAttributeParser<S> for RustcAllowConstFnUnstableParser {
const PATH: &[Symbol] = &[sym::rustc_allow_const_fn_unstable];
type Item = Symbol;
const CONVERT: ConvertFn<Self::Item> =
Expand Down
14 changes: 7 additions & 7 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ impl<S: Stage> SingleAttributeParser<S> for ExportNameParser {
}
}

pub(crate) struct ObjcClassParser;
pub(crate) struct RustcObjcClassParser;

impl<S: Stage> SingleAttributeParser<S> for ObjcClassParser {
impl<S: Stage> SingleAttributeParser<S> for RustcObjcClassParser {
const PATH: &[rustc_span::Symbol] = &[sym::rustc_objc_class];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
Expand Down Expand Up @@ -185,9 +185,9 @@ impl<S: Stage> SingleAttributeParser<S> for ObjcClassParser {
}
}

pub(crate) struct ObjcSelectorParser;
pub(crate) struct RustcObjcSelectorParser;

impl<S: Stage> SingleAttributeParser<S> for ObjcSelectorParser {
impl<S: Stage> SingleAttributeParser<S> for RustcObjcSelectorParser {
const PATH: &[rustc_span::Symbol] = &[sym::rustc_objc_selector];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
Expand Down Expand Up @@ -709,13 +709,13 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcPassIndirectlyInNonRusticAbisPa
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcPassIndirectlyInNonRusticAbis;
}

pub(crate) struct EiiForeignItemParser;
pub(crate) struct RustcEiiForeignItemParser;

impl<S: Stage> NoArgsAttributeParser<S> for EiiForeignItemParser {
impl<S: Stage> NoArgsAttributeParser<S> for RustcEiiForeignItemParser {
const PATH: &[Symbol] = &[sym::rustc_eii_foreign_item];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::ForeignFn)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::EiiForeignItem;
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcEiiForeignItem;
}

pub(crate) struct PatchableFunctionEntryParser;
Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_attr_parsing/src/attributes/deprecation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ use crate::session_diagnostics::{
DeprecatedItemSuggestion, InvalidSince, MissingNote, MissingSince,
};

pub(crate) struct DeprecationParser;

fn get<S: Stage>(
cx: &AcceptContext<'_, '_, S>,
name: Symbol,
Expand All @@ -33,7 +31,8 @@ fn get<S: Stage>(
}
}

impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
pub(crate) struct DeprecatedParser;
impl<S: Stage> SingleAttributeParser<S> for DeprecatedParser {
const PATH: &[Symbol] = &[sym::deprecated];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
Expand Down Expand Up @@ -164,7 +163,7 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
return None;
}

Some(AttributeKind::Deprecation {
Some(AttributeKind::Deprecated {
deprecation: Deprecation { since, note, suggestion },
span: cx.attr_span,
})
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/dummy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use crate::context::{AcceptContext, Stage};
use crate::parser::ArgParser;
use crate::target_checking::{ALL_TARGETS, AllowedTargets};

pub(crate) struct DummyParser;
impl<S: Stage> SingleAttributeParser<S> for DummyParser {
pub(crate) struct RustcDummyParser;
impl<S: Stage> SingleAttributeParser<S> for RustcDummyParser {
const PATH: &[Symbol] = &[sym::rustc_dummy];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Ignore;
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
Expand Up @@ -524,8 +524,8 @@ impl<S: Stage> NoArgsAttributeParser<S> for FfiPureParser {
const CREATE: fn(Span) -> AttributeKind = AttributeKind::FfiPure;
}

pub(crate) struct StdInternalSymbolParser;
impl<S: Stage> NoArgsAttributeParser<S> for StdInternalSymbolParser {
pub(crate) struct RustcStdInternalSymbolParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcStdInternalSymbolParser {
const PATH: &[Symbol] = &[sym::rustc_std_internal_symbol];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Expand Down
16 changes: 8 additions & 8 deletions compiler/rustc_attr_parsing/src/attributes/lint_helpers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::prelude::*;

pub(crate) struct AsPtrParser;
impl<S: Stage> NoArgsAttributeParser<S> for AsPtrParser {
pub(crate) struct RustcAsPtrParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcAsPtrParser {
const PATH: &[Symbol] = &[sym::rustc_as_ptr];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Expand All @@ -14,8 +14,8 @@ impl<S: Stage> NoArgsAttributeParser<S> for AsPtrParser {
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcAsPtr;
}

pub(crate) struct PubTransparentParser;
impl<S: Stage> NoArgsAttributeParser<S> for PubTransparentParser {
pub(crate) struct RustcPubTransparentParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcPubTransparentParser {
const PATH: &[Symbol] = &[sym::rustc_pub_transparent];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Expand All @@ -26,8 +26,8 @@ impl<S: Stage> NoArgsAttributeParser<S> for PubTransparentParser {
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcPubTransparent;
}

pub(crate) struct PassByValueParser;
impl<S: Stage> NoArgsAttributeParser<S> for PassByValueParser {
pub(crate) struct RustcPassByValueParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcPassByValueParser {
const PATH: &[Symbol] = &[sym::rustc_pass_by_value];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Expand All @@ -38,8 +38,8 @@ impl<S: Stage> NoArgsAttributeParser<S> for PassByValueParser {
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcPassByValue;
}

pub(crate) struct RustcShouldNotBeCalledOnConstItems;
impl<S: Stage> NoArgsAttributeParser<S> for RustcShouldNotBeCalledOnConstItems {
pub(crate) struct RustcShouldNotBeCalledOnConstItemsParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcShouldNotBeCalledOnConstItemsParser {
const PATH: &[Symbol] = &[sym::rustc_should_not_be_called_on_const_items];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Expand Down
18 changes: 9 additions & 9 deletions compiler/rustc_attr_parsing/src/attributes/repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ fn parse_alignment(node: &LitKind) -> Result<Align, &'static str> {

/// Parse #[align(N)].
#[derive(Default)]
pub(crate) struct AlignParser(Option<(Align, Span)>);
pub(crate) struct RustcAlignParser(Option<(Align, Span)>);

impl AlignParser {
impl RustcAlignParser {
const PATH: &[Symbol] = &[sym::rustc_align];
const TEMPLATE: AttributeTemplate = template!(List: &["<alignment in bytes>"]);

Expand Down Expand Up @@ -308,7 +308,7 @@ impl AlignParser {
}
}

impl<S: Stage> AttributeParser<S> for AlignParser {
impl<S: Stage> AttributeParser<S> for RustcAlignParser {
const ATTRIBUTES: AcceptMapping<Self, S> = &[(Self::PATH, Self::TEMPLATE, Self::parse)];
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Expand All @@ -321,29 +321,29 @@ impl<S: Stage> AttributeParser<S> for AlignParser {

fn finalize(self, _cx: &FinalizeContext<'_, '_, S>) -> Option<AttributeKind> {
let (align, span) = self.0?;
Some(AttributeKind::Align { align, span })
Some(AttributeKind::RustcAlign { align, span })
}
}

#[derive(Default)]
pub(crate) struct AlignStaticParser(AlignParser);
pub(crate) struct RustcAlignStaticParser(RustcAlignParser);

impl AlignStaticParser {
impl RustcAlignStaticParser {
const PATH: &[Symbol] = &[sym::rustc_align_static];
const TEMPLATE: AttributeTemplate = AlignParser::TEMPLATE;
const TEMPLATE: AttributeTemplate = RustcAlignParser::TEMPLATE;

fn parse<S: Stage>(&mut self, cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) {
self.0.parse(cx, args)
}
}

impl<S: Stage> AttributeParser<S> for AlignStaticParser {
impl<S: Stage> AttributeParser<S> for RustcAlignStaticParser {
const ATTRIBUTES: AcceptMapping<Self, S> = &[(Self::PATH, Self::TEMPLATE, Self::parse)];
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowList(&[Allow(Target::Static), Allow(Target::ForeignStatic)]);

fn finalize(self, _cx: &FinalizeContext<'_, '_, S>) -> Option<AttributeKind> {
let (align, span) = self.0.0?;
Some(AttributeKind::Align { align, span })
Some(AttributeKind::RustcAlign { align, span })
}
}
18 changes: 9 additions & 9 deletions compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ impl<S: Stage> SingleAttributeParser<S> for RustcMustImplementOneOfParser {
}
}

pub(crate) struct RustcNeverReturnsNullPointerParser;
pub(crate) struct RustcNeverReturnsNullPtrParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcNeverReturnsNullPointerParser {
impl<S: Stage> NoArgsAttributeParser<S> for RustcNeverReturnsNullPtrParser {
const PATH: &[Symbol] = &[sym::rustc_never_returns_null_ptr];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Expand All @@ -83,7 +83,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcNeverReturnsNullPointerParser {
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcNeverReturnsNullPointer;
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcNeverReturnsNullPtr;
}
pub(crate) struct RustcNoImplicitAutorefsParser;

Expand Down Expand Up @@ -1215,9 +1215,10 @@ impl<S: Stage> NoArgsAttributeParser<S> for RustcNonnullOptimizationGuaranteedPa
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcNonnullOptimizationGuaranteed;
}

pub(crate) struct RustcSymbolName;
pub(crate) struct RustcSymbolNameParser;

impl<S: Stage> SingleAttributeParser<S> for RustcSymbolName {
impl<S: Stage> SingleAttributeParser<S> for RustcSymbolNameParser {
const PATH: &[Symbol] = &[sym::rustc_symbol_name];
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Allow(Target::Method(MethodKind::TraitImpl)),
Expand All @@ -1228,7 +1229,6 @@ impl<S: Stage> SingleAttributeParser<S> for RustcSymbolName {
Allow(Target::Impl { of_trait: false }),
]);
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const PATH: &[Symbol] = &[sym::rustc_symbol_name];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const TEMPLATE: AttributeTemplate = template!(Word);
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
Expand All @@ -1240,9 +1240,10 @@ impl<S: Stage> SingleAttributeParser<S> for RustcSymbolName {
}
}

pub(crate) struct RustcDefPath;
pub(crate) struct RustcDefPathParser;

impl<S: Stage> SingleAttributeParser<S> for RustcDefPath {
impl<S: Stage> SingleAttributeParser<S> for RustcDefPathParser {
const PATH: &[Symbol] = &[sym::rustc_def_path];
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Allow(Target::Method(MethodKind::TraitImpl)),
Expand All @@ -1253,7 +1254,6 @@ impl<S: Stage> SingleAttributeParser<S> for RustcDefPath {
Allow(Target::Impl { of_trait: false }),
]);
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const PATH: &[Symbol] = &[sym::rustc_def_path];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const TEMPLATE: AttributeTemplate = template!(Word);
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_attr_parsing/src/attributes/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ impl<S: Stage> AttributeParser<S> for BodyStabilityParser {
}
}

pub(crate) struct ConstStabilityIndirectParser;
impl<S: Stage> NoArgsAttributeParser<S> for ConstStabilityIndirectParser {
pub(crate) struct RustcConstStableIndirectParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcConstStableIndirectParser {
const PATH: &[Symbol] = &[sym::rustc_const_stable_indirect];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Ignore;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Allow(Target::Method(MethodKind::Inherent)),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcConstStabilityIndirect;
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcConstStableIndirect;
}

#[derive(Default)]
Expand Down
32 changes: 16 additions & 16 deletions compiler/rustc_attr_parsing/src/attributes/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use crate::parser::ArgParser;
use crate::target_checking::Policy::{Allow, Warn};
use crate::target_checking::{ALL_TARGETS, AllowedTargets};

pub(crate) struct SkipDuringMethodDispatchParser;
impl<S: Stage> SingleAttributeParser<S> for SkipDuringMethodDispatchParser {
pub(crate) struct RustcSkipDuringMethodDispatchParser;
impl<S: Stage> SingleAttributeParser<S> for RustcSkipDuringMethodDispatchParser {
const PATH: &[Symbol] = &[sym::rustc_skip_during_method_dispatch];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
Expand Down Expand Up @@ -58,8 +58,8 @@ impl<S: Stage> SingleAttributeParser<S> for SkipDuringMethodDispatchParser {
}
}

pub(crate) struct ParenSugarParser;
impl<S: Stage> NoArgsAttributeParser<S> for ParenSugarParser {
pub(crate) struct RustcParenSugarParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcParenSugarParser {
const PATH: &[Symbol] = &[sym::rustc_paren_sugar];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
Expand All @@ -81,16 +81,16 @@ impl<S: Stage> NoArgsAttributeParser<S> for MarkerParser {
const CREATE: fn(Span) -> AttributeKind = AttributeKind::Marker;
}

pub(crate) struct DenyExplicitImplParser;
impl<S: Stage> NoArgsAttributeParser<S> for DenyExplicitImplParser {
pub(crate) struct RustcDenyExplicitImplParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcDenyExplicitImplParser {
const PATH: &[Symbol] = &[sym::rustc_deny_explicit_impl];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcDenyExplicitImpl;
}

pub(crate) struct DynIncompatibleTraitParser;
impl<S: Stage> NoArgsAttributeParser<S> for DynIncompatibleTraitParser {
pub(crate) struct RustcDynIncompatibleTraitParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcDynIncompatibleTraitParser {
const PATH: &[Symbol] = &[sym::rustc_dyn_incompatible_trait];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
Expand All @@ -99,16 +99,16 @@ impl<S: Stage> NoArgsAttributeParser<S> for DynIncompatibleTraitParser {

// Specialization

pub(crate) struct SpecializationTraitParser;
impl<S: Stage> NoArgsAttributeParser<S> for SpecializationTraitParser {
pub(crate) struct RustcSpecializationTraitParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcSpecializationTraitParser {
const PATH: &[Symbol] = &[sym::rustc_specialization_trait];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcSpecializationTrait;
}

pub(crate) struct UnsafeSpecializationMarkerParser;
impl<S: Stage> NoArgsAttributeParser<S> for UnsafeSpecializationMarkerParser {
pub(crate) struct RustcUnsafeSpecializationMarkerParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcUnsafeSpecializationMarkerParser {
const PATH: &[Symbol] = &[sym::rustc_unsafe_specialization_marker];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
Expand All @@ -117,16 +117,16 @@ impl<S: Stage> NoArgsAttributeParser<S> for UnsafeSpecializationMarkerParser {

// Coherence

pub(crate) struct CoinductiveParser;
impl<S: Stage> NoArgsAttributeParser<S> for CoinductiveParser {
pub(crate) struct RustcCoinductiveParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcCoinductiveParser {
const PATH: &[Symbol] = &[sym::rustc_coinductive];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcCoinductive;
}

pub(crate) struct AllowIncoherentImplParser;
impl<S: Stage> NoArgsAttributeParser<S> for AllowIncoherentImplParser {
pub(crate) struct RustcAllowIncoherentImplParser;
impl<S: Stage> NoArgsAttributeParser<S> for RustcAllowIncoherentImplParser {
const PATH: &[Symbol] = &[sym::rustc_allow_incoherent_impl];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets =
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/transparency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use rustc_span::hygiene::Transparency;

use super::prelude::*;

pub(crate) struct TransparencyParser;
pub(crate) struct RustcMacroTransparencyParser;

impl<S: Stage> SingleAttributeParser<S> for TransparencyParser {
impl<S: Stage> SingleAttributeParser<S> for RustcMacroTransparencyParser {
const PATH: &[Symbol] = &[sym::rustc_macro_transparency];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Custom(|cx, used, unused| {
Expand Down
Loading
Loading