Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f62b2f3
[BPF] add target feature allows-misaligned-mem-access
clairechingching Feb 23, 2026
976c53f
Remove `ATTRIBUTE_ORDER`
JonathanBrouwer Feb 24, 2026
e108da9
`std`: include `dlmalloc` for all non-wasi Wasm targets
Twey Mar 11, 2026
e2923eb
`std`: don't depend on `dlmalloc` when `cfg(unix)`
Twey Mar 11, 2026
e15897f
Parenthesize or-patterns in prefix pattern positions in pretty printer
aytey Mar 19, 2026
1a1a0d2
Update Clippy test expectations for or-pattern parenthesization
aytey Mar 19, 2026
f9752e2
bootstrap: Pass `--features=rustc` to rustc_transmute
jyn514 Mar 19, 2026
3ad92c9
On E0277 tweak help when single type impls traits
estebank Mar 21, 2026
5841fa8
Inline and remove `QueryVTable::is_loadable_from_disk_fn`.
nnethercote Mar 22, 2026
5491c35
check earlier for misused crate-level attributes
scrabsha Feb 27, 2026
1c6a8fe
check earlier for attributes that are placed in `where` predicate
scrabsha Mar 4, 2026
29e9273
drop derive helpers during ast lowering
scrabsha Feb 27, 2026
d52943a
Remove assertion in `load_from_disk_or_invoke_provider_green`.
nnethercote Mar 22, 2026
be8dee1
interpret/validity: remove unreachable error kind
RalfJung Mar 22, 2026
8befc9d
refactor RangeFromIter overflow-checks impl
pitaj Mar 21, 2026
fa3e85a
diagnostics: avoid ICE in confusable_method_name for associated funct…
Unique-Usman Mar 22, 2026
cde59f0
Remove another assertion in `load_from_disk_or_invoke_provider_green`.
nnethercote Mar 22, 2026
6f08437
improve inline assembly error messages
folkertdev Mar 22, 2026
327216d
Refactor `load_from_disk_or_invoke_provider_green`.
nnethercote Mar 22, 2026
8dcb257
Document consteval behavior of ub_checks & overflow_checks.
theemathas Mar 23, 2026
338deef
Remove outdated consteval docs for is_val_statically_known.
theemathas Mar 23, 2026
d044b6b
Rollup merge of #153686 - Twey:patch-1, r=Mark-Simulacrum
JonathanBrouwer Mar 23, 2026
527ed70
Rollup merge of #154105 - ferrocene:jyn/test-transmute, r=Mark-Simula…
JonathanBrouwer Mar 23, 2026
c2ec981
Rollup merge of #153041 - JonathanBrouwer:attribute_order, r=jdonszel…
JonathanBrouwer Mar 23, 2026
261c7c9
Rollup merge of #153069 - blueshift-gg:BPF_unaligned, r=chenyukang
JonathanBrouwer Mar 23, 2026
7aed5fd
Rollup merge of #154085 - aytey:fix-at-or-pattern-parens, r=chenyukang
JonathanBrouwer Mar 23, 2026
d107539
Rollup merge of #154191 - pitaj:fix-154124, r=tgross35
JonathanBrouwer Mar 23, 2026
0bd67fe
Rollup merge of #154207 - nnethercote:refactor-query-loading, r=Zalathar
JonathanBrouwer Mar 23, 2026
c24dfa5
Rollup merge of #153540 - scrabsha:sasha/drop-derive-helpers, r=jdons…
JonathanBrouwer Mar 23, 2026
6ed0667
Rollup merge of #154140 - theemathas:checks_always_on_in_const, r=Ral…
JonathanBrouwer Mar 23, 2026
c6b6f90
Rollup merge of #154161 - estebank:e0277-ty-impls, r=Kivooeo
JonathanBrouwer Mar 23, 2026
43654df
Rollup merge of #154218 - RalfJung:validity-init-scalar, r=nnethercote
JonathanBrouwer Mar 23, 2026
c570b97
Rollup merge of #154225 - Unique-Usman:ua/rustc_confusable, r=Kivooeo
JonathanBrouwer Mar 23, 2026
ef6f1a6
Rollup merge of #154228 - folkertdev:mention-invalid-template-modifie…
JonathanBrouwer Mar 23, 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
29 changes: 9 additions & 20 deletions compiler/rustc_ast_lowering/src/asm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::collections::hash_map::Entry;
use std::fmt::Write;

use rustc_ast::*;
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
Expand Down Expand Up @@ -124,13 +123,9 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
self.dcx().emit_err(ClobberAbiNotSupported { abi_span: *abi_span });
}
Err(supported_abis) => {
let mut abis = format!("`{}`", supported_abis[0]);
for m in &supported_abis[1..] {
let _ = write!(abis, ", `{m}`");
}
self.dcx().emit_err(InvalidAbiClobberAbi {
abi_span: *abi_span,
supported_abis: abis,
supported_abis: supported_abis.to_vec().into(),
});
}
}
Expand Down Expand Up @@ -164,15 +159,12 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
asm::InlineAsmRegOrRegClass::RegClass(if let Some(asm_arch) = asm_arch {
asm::InlineAsmRegClass::parse(asm_arch, reg_class).unwrap_or_else(
|supported_register_classes| {
let mut register_classes =
format!("`{}`", supported_register_classes[0]);
for m in &supported_register_classes[1..] {
let _ = write!(register_classes, ", `{m}`");
}
self.dcx().emit_err(InvalidRegisterClass {
op_span: *op_sp,
reg_class,
supported_register_classes: register_classes,
supported_register_classes: supported_register_classes
.to_vec()
.into(),
});
asm::InlineAsmRegClass::Err
},
Expand Down Expand Up @@ -272,23 +264,20 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
}
let valid_modifiers = class.valid_modifiers(asm_arch.unwrap());
if !valid_modifiers.contains(&modifier) {
let sub = if !valid_modifiers.is_empty() {
let mut mods = format!("`{}`", valid_modifiers[0]);
for m in &valid_modifiers[1..] {
let _ = write!(mods, ", `{m}`");
}
InvalidAsmTemplateModifierRegClassSub::SupportModifier {
let sub = if valid_modifiers.is_empty() {
InvalidAsmTemplateModifierRegClassSub::DoesNotSupportModifier {
class_name: class.name(),
modifiers: mods,
}
} else {
InvalidAsmTemplateModifierRegClassSub::DoesNotSupportModifier {
InvalidAsmTemplateModifierRegClassSub::SupportModifier {
class_name: class.name(),
modifiers: valid_modifiers.to_vec().into(),
}
};
self.dcx().emit_err(InvalidAsmTemplateModifierRegClass {
placeholder_span,
op_span: op_sp,
modifier: modifier.to_string(),
sub,
});
}
Expand Down
13 changes: 7 additions & 6 deletions compiler/rustc_ast_lowering/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_errors::DiagArgFromDisplay;
use rustc_errors::codes::*;
use rustc_errors::{DiagArgFromDisplay, DiagSymbolList};
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_span::{Ident, Span, Symbol};

Expand Down Expand Up @@ -191,10 +191,10 @@ pub(crate) struct ClobberAbiNotSupported {
#[derive(Diagnostic)]
#[note("the following ABIs are supported on this target: {$supported_abis}")]
#[diag("invalid ABI for `clobber_abi`")]
pub(crate) struct InvalidAbiClobberAbi {
pub(crate) struct InvalidAbiClobberAbi<'a> {
#[primary_span]
pub abi_span: Span,
pub supported_abis: String,
pub supported_abis: DiagSymbolList<&'a str>,
}

#[derive(Diagnostic)]
Expand All @@ -215,17 +215,18 @@ pub(crate) struct InvalidRegisterClass {
#[primary_span]
pub op_span: Span,
pub reg_class: Symbol,
pub supported_register_classes: String,
pub supported_register_classes: DiagSymbolList<Symbol>,
}

#[derive(Diagnostic)]
#[diag("invalid asm template modifier for this register class")]
#[diag("invalid asm template modifier `{$modifier}` for this register class")]
pub(crate) struct InvalidAsmTemplateModifierRegClass {
#[primary_span]
#[label("template modifier")]
pub placeholder_span: Span,
#[label("argument")]
pub op_span: Span,
pub modifier: String,
#[subdiagnostic]
pub sub: InvalidAsmTemplateModifierRegClassSub,
}
Expand All @@ -235,7 +236,7 @@ pub(crate) enum InvalidAsmTemplateModifierRegClassSub {
#[note(
"the `{$class_name}` register class supports the following template modifiers: {$modifiers}"
)]
SupportModifier { class_name: Symbol, modifiers: String },
SupportModifier { class_name: Symbol, modifiers: DiagSymbolList<char> },
#[note("the `{$class_name}` register class does not support template modifiers")]
DoesNotSupportModifier { class_name: Symbol },
}
Expand Down
23 changes: 20 additions & 3 deletions compiler/rustc_ast_pretty/src/pprust/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,23 @@ impl<'a> State<'a> {
}
}

/// Print a pattern, parenthesizing it if it is an or-pattern (`A | B`).
///
/// Or-patterns have the lowest precedence among patterns, so they need
/// parentheses when nested inside `@` bindings, `&` references, or `box`
/// patterns — otherwise `x @ A | B` parses as `(x @ A) | B`, `&A | B`
/// parses as `(&A) | B`, etc.
fn print_pat_paren_if_or(&mut self, pat: &ast::Pat) {
let needs_paren = matches!(pat.kind, PatKind::Or(..));
if needs_paren {
self.popen();
}
self.print_pat(pat);
if needs_paren {
self.pclose();
}
}

fn print_pat(&mut self, pat: &ast::Pat) {
self.maybe_print_comment(pat.span.lo());
self.ann.pre(self, AnnNode::Pat(pat));
Expand Down Expand Up @@ -1813,7 +1830,7 @@ impl<'a> State<'a> {
if let Some(p) = sub {
self.space();
self.word_space("@");
self.print_pat(p);
self.print_pat_paren_if_or(p);
}
}
PatKind::TupleStruct(qself, path, elts) => {
Expand Down Expand Up @@ -1885,7 +1902,7 @@ impl<'a> State<'a> {
}
PatKind::Box(inner) => {
self.word("box ");
self.print_pat(inner);
self.print_pat_paren_if_or(inner);
}
PatKind::Deref(inner) => {
self.word("deref!");
Expand All @@ -1909,7 +1926,7 @@ impl<'a> State<'a> {
self.print_pat(inner);
self.pclose();
} else {
self.print_pat(inner);
self.print_pat_paren_if_or(inner);
}
}
PatKind::Expr(e) => self.print_expr(e, FixupContext::default()),
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_attr_parsing/src/attributes/autodiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rustc_span::{Symbol, sym};
use thin_vec::ThinVec;

use crate::attributes::prelude::Allow;
use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
use crate::attributes::{OnDuplicate, SingleAttributeParser};
use crate::context::{AcceptContext, Stage};
use crate::parser::{ArgParser, MetaItemOrLitParser};
use crate::target_checking::AllowedTargets;
Expand All @@ -18,7 +18,6 @@ pub(crate) struct RustcAutodiffParser;

impl<S: Stage> SingleAttributeParser<S> for RustcAutodiffParser {
const PATH: &[Symbol] = &[sym::rustc_autodiff];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_attr_parsing/src/attributes/cfi_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ impl<S: Stage> SingleAttributeParser<S> for CfiEncodingParser {
Allow(Target::Enum),
Allow(Target::Union),
]);
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "encoding");

Expand Down
7 changes: 0 additions & 7 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pub(crate) struct OptimizeParser;

impl<S: Stage> SingleAttributeParser<S> for OptimizeParser {
const PATH: &[Symbol] = &[sym::optimize];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Expand Down Expand Up @@ -68,7 +67,6 @@ pub(crate) struct CoverageParser;

impl<S: Stage> SingleAttributeParser<S> for CoverageParser {
const PATH: &[Symbol] = &[sym::coverage];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Expand Down Expand Up @@ -119,7 +117,6 @@ pub(crate) struct ExportNameParser;

impl<S: Stage> SingleAttributeParser<S> for ExportNameParser {
const PATH: &[rustc_span::Symbol] = &[sym::export_name];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Static),
Expand Down Expand Up @@ -157,7 +154,6 @@ pub(crate) struct RustcObjcClassParser;

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;
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowList(&[Allow(Target::ForeignStatic)]);
Expand Down Expand Up @@ -189,7 +185,6 @@ pub(crate) struct RustcObjcSelectorParser;

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;
const ALLOWED_TARGETS: AllowedTargets =
AllowedTargets::AllowList(&[Allow(Target::ForeignStatic)]);
Expand Down Expand Up @@ -595,7 +590,6 @@ impl<S: Stage> SingleAttributeParser<S> for SanitizeParser {
r#"realtime = "nonblocking|blocking|caller""#,
]);

const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
Expand Down Expand Up @@ -724,7 +718,6 @@ pub(crate) struct PatchableFunctionEntryParser;
impl<S: Stage> SingleAttributeParser<S> for PatchableFunctionEntryParser {
const PATH: &[Symbol] = &[sym::patchable_function_entry];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Fn)]);
const TEMPLATE: AttributeTemplate = template!(List: &["prefix_nops = m, entry_nops = n"]);

Expand Down
6 changes: 0 additions & 6 deletions compiler/rustc_attr_parsing/src/attributes/crate_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub(crate) struct CrateNameParser;

impl<S: Stage> SingleAttributeParser<S> for CrateNameParser {
const PATH: &[Symbol] = &[sym::crate_name];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "name");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
Expand Down Expand Up @@ -84,7 +83,6 @@ pub(crate) struct RecursionLimitParser;

impl<S: Stage> SingleAttributeParser<S> for RecursionLimitParser {
const PATH: &[Symbol] = &[sym::recursion_limit];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "N", "https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
Expand All @@ -107,7 +105,6 @@ pub(crate) struct MoveSizeLimitParser;

impl<S: Stage> SingleAttributeParser<S> for MoveSizeLimitParser {
const PATH: &[Symbol] = &[sym::move_size_limit];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "N");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
Expand All @@ -130,7 +127,6 @@ pub(crate) struct TypeLengthLimitParser;

impl<S: Stage> SingleAttributeParser<S> for TypeLengthLimitParser {
const PATH: &[Symbol] = &[sym::type_length_limit];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "N");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
Expand All @@ -153,7 +149,6 @@ pub(crate) struct PatternComplexityLimitParser;

impl<S: Stage> SingleAttributeParser<S> for PatternComplexityLimitParser {
const PATH: &[Symbol] = &[sym::pattern_complexity_limit];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "N");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
Expand Down Expand Up @@ -213,7 +208,6 @@ pub(crate) struct WindowsSubsystemParser;
impl<S: Stage> SingleAttributeParser<S> for WindowsSubsystemParser {
const PATH: &[Symbol] = &[sym::windows_subsystem];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: ["windows", "console"], "https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute");

Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_attr_parsing/src/attributes/deprecation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ fn get<S: Stage>(
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;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowListWarnRest(&[
Allow(Target::Fn),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ use rustc_hir::lints::AttributeLintKind;
use rustc_session::lint::builtin::MALFORMED_DIAGNOSTIC_ATTRIBUTES;
use rustc_span::{Symbol, sym};

use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
use crate::attributes::{OnDuplicate, SingleAttributeParser};
use crate::context::{AcceptContext, Stage};
use crate::parser::ArgParser;
use crate::target_checking::{ALL_TARGETS, AllowedTargets};

pub(crate) struct DoNotRecommendParser;
impl<S: Stage> SingleAttributeParser<S> for DoNotRecommendParser {
const PATH: &[Symbol] = &[sym::diagnostic, sym::do_not_recommend];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS); // Checked in check_attr.
const TEMPLATE: AttributeTemplate = template!(Word /*doesn't matter */);
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_attr_parsing/src/attributes/dummy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ use rustc_feature::{AttributeTemplate, template};
use rustc_hir::attrs::AttributeKind;
use rustc_span::{Symbol, sym};

use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
use crate::attributes::{OnDuplicate, SingleAttributeParser};
use crate::context::{AcceptContext, Stage};
use crate::parser::ArgParser;
use crate::target_checking::{ALL_TARGETS, AllowedTargets};

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;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS);
const TEMPLATE: AttributeTemplate = template!(Word); // Anything, really
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub(crate) struct InlineParser;

impl<S: Stage> SingleAttributeParser<S> for InlineParser {
const PATH: &[Symbol] = &[sym::inline];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Expand Down Expand Up @@ -68,7 +67,6 @@ pub(crate) struct RustcForceInlineParser;

impl<S: Stage> SingleAttributeParser<S> for RustcForceInlineParser {
const PATH: &[Symbol] = &[sym::rustc_force_inline];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ impl<S: Stage> SingleAttributeParser<S> for InstructionSetParser {
]);
const TEMPLATE: AttributeTemplate = template!(List: &["set"], "https://doc.rust-lang.org/reference/attributes/codegen.html#the-instruction_set-attribute");
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
const POSSIBLE_SYMBOLS: &[Symbol] = &[sym::arm_a32, sym::arm_t32];
Expand Down
Loading
Loading