Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
1bd4fa0
Add tuple never coercion collection regression test
chenyukang Jul 24, 2026
bae7e21
Check unsafe impls on safe EIIs
AsakuraMizu Jul 23, 2026
4bd52e9
Remove redundant `#[rustc_paren_sugar]` feature gate
mejrs Jul 24, 2026
75529d4
rustc_parse: Stop returning `Option` from statement parsing
petrochenkov Jul 24, 2026
a32fa44
Updated expect messages for CString struct and method documentation
asder8215 Jul 24, 2026
c9e2429
Remove obsolete option `build.compiletest-use-stage0-libtest`
Zalathar Jul 25, 2026
36ef11a
Update expect messages in library/alloc/boxed.rs and library/alloc/st…
Colepng Jul 25, 2026
05bb184
sembr src/variance.md
tshepang Jul 25, 2026
5d19c92
Prepare for merging from rust-lang/rust
invalid-email-address Jul 25, 2026
bb4b62b
Merge ref 'da86f4d0726b' from rust-lang/rust
invalid-email-address Jul 25, 2026
acb9407
Split multiline derives into std/rustc macros
mejrs Jul 25, 2026
d57ee22
improve variance.md
tshepang Jul 25, 2026
4196283
Add warning for breakage hazard for introducing new builtin attrs
jieyouxu Jul 25, 2026
d44d12d
Merge pull request #2944 from jieyouxu/builtin_attr
jieyouxu Jul 25, 2026
f36f2b9
sembr src/rustdoc-internals/rustdoc-gui-test-suite.md
tshepang Jul 25, 2026
0d9c6a4
overlong
tshepang Jul 25, 2026
c565998
punctuation
tshepang Jul 25, 2026
54c2643
sembr src/rustdoc-internals/search.md
tshepang Jul 25, 2026
3aecf93
Fix `find_attr` hygiene issues
mejrs Jul 25, 2026
71f1401
typo
tshepang Jul 25, 2026
19ec811
sembr src/stability-guarantees.md
tshepang Jul 25, 2026
2500a68
sembr src/pat-exhaustive-checking.md
tshepang Jul 25, 2026
beddeb0
remove `extern crate self as rustc_hir;` statement
mejrs Jul 25, 2026
72da0f5
improve pat-exhaustive-checking.md
tshepang Jul 25, 2026
a477499
sembr src/ast-validation.md
tshepang Jul 25, 2026
8da4c50
sembr src/notification-groups/gpu-target.md
tshepang Jul 25, 2026
a88b4f0
improve notification-groups/gpu-target.md
tshepang Jul 25, 2026
be78fc8
sembr src/notification-groups/wasm.md
tshepang Jul 25, 2026
01f3867
select the right text to link
tshepang Jul 25, 2026
5c30492
sembr src/const-eval.md
tshepang Jul 25, 2026
721d2b3
Merge pull request #2945 from rust-lang/tshepang/misc
tshepang Jul 25, 2026
ac7ecbd
Merge pull request #2943 from rust-lang/rustc-pull
tshepang Jul 25, 2026
6ce8067
sembr src/attributes.md
tshepang Jul 25, 2026
0dc322b
reflow
tshepang Jul 25, 2026
67e048e
sembr src/tests/autodiff-ci-job.md
tshepang Jul 25, 2026
b5803d3
sembr src/profiling/with-perf.md
tshepang Jul 25, 2026
b7f7f0d
improve profiling/with-perf.md
tshepang Jul 25, 2026
c39587c
Merge pull request #2946 from rust-lang/tshepang/misc
tshepang Jul 25, 2026
4d31be2
Flatten `nested_filter` module, and rename `None`.
mejrs Jul 25, 2026
b41588f
Replace `unreachable!` with `!`
mejrs Jul 25, 2026
c49a172
Note that the expected runtime signature is for the current target only
Urgau Jul 25, 2026
9e9467a
codegen: handle OperandValue::Uninit in codegen_return_terminator
glandium Jul 24, 2026
147c13a
Move extern static mut linkage check to check_attr
mejrs Jul 20, 2026
e75e08d
update linkage test
mejrs Jul 20, 2026
8b3a75c
reject linkage attr on const fn
mejrs Jul 20, 2026
641d79e
Add fixme
mejrs Jul 20, 2026
029a240
fix: error in diagnostic on_unmatched_args
amirHdev Jul 25, 2026
7ffc037
disallow linkage on trait methods without body
mejrs Jul 20, 2026
ecc8402
rename abort_unwind → abort_on_unwind
RalfJung Jul 25, 2026
aae9c69
Adjust linkage error wording
mejrs Jul 25, 2026
d3978fb
Rollup merge of #159825 - glandium:issue159815, r=oli-obk
JonathanBrouwer Jul 25, 2026
5188e34
Rollup merge of #159617 - mejrs:weak_linkage, r=JonathanBrouwer
JonathanBrouwer Jul 25, 2026
f17b357
Rollup merge of #159783 - AsakuraMizu:safe-eii-unsafe-impl, r=mejrs,J…
JonathanBrouwer Jul 25, 2026
d4dcec4
Rollup merge of #159810 - chenyukang:yukang-fix-100727-tuple-never-co…
JonathanBrouwer Jul 25, 2026
9f33b65
Rollup merge of #159826 - mejrs:sugar_parens, r=JonathanBrouwer
JonathanBrouwer Jul 25, 2026
92f7bc9
Rollup merge of #159849 - petrochenkov:estmt, r=JonathanBrouwer
JonathanBrouwer Jul 25, 2026
0dc1270
Rollup merge of #159853 - asder8215:cstr_expect, r=fee1-dead
JonathanBrouwer Jul 25, 2026
ba33bef
Rollup merge of #159878 - Zalathar:stage0-libtest, r=Kobzol
JonathanBrouwer Jul 25, 2026
6cb4cd6
Rollup merge of #159882 - Colepng:main, r=Darksonn
JonathanBrouwer Jul 25, 2026
e22bf3d
Rollup merge of #159891 - mejrs:split_derives, r=JonathanBrouwer
JonathanBrouwer Jul 25, 2026
79aedd2
Rollup merge of #159893 - mejrs:find_attr_hygiene, r=JonathanBrouwer
JonathanBrouwer Jul 25, 2026
0c6d8e4
Rollup merge of #159895 - tshepang:rdg-sync, r=tshepang
JonathanBrouwer Jul 25, 2026
4c20daf
Rollup merge of #159902 - Urgau:runtime-symbols-for-current-target, r…
JonathanBrouwer Jul 25, 2026
ed8de4e
Rollup merge of #159914 - amirHdev:fix-on-unmatched-args, r=mejrs
JonathanBrouwer Jul 25, 2026
3720bfa
Rollup merge of #159918 - RalfJung:abort_unwind, r=hanna-kruppe
JonathanBrouwer Jul 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
5 changes: 4 additions & 1 deletion compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
hir::attrs::EiiImpl {
span: self.lower_span(*span),
inner_span: self.lower_span(*inner_span),
impl_marked_unsafe: self.lower_safety(*impl_safety, hir::Safety::Safe).is_unsafe(),
impl_unsafe_span: match *impl_safety {
Safety::Unsafe(span) => Some(self.lower_span(span)),
Safety::Safe(_) | Safety::Default => None,
},
is_default: *is_default,
resolution,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ impl AttributeParser for OnUnmatchedArgsParser {
AttributeStability::Stable, // Unstable, stability checked manually in the parser
|this, cx, args| {
if !cx.features().diagnostic_on_unmatched_args() {
// `UnknownDiagnosticAttribute` is emitted in rustc_resolve/macros.rs
args.ignore_args();
return;
}

Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_attr_parsing/src/attributes/link_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,14 +642,13 @@ pub(crate) struct LinkageParser;
impl SingleAttributeParser for LinkageParser {
const PATH: &[Symbol] = &[sym::linkage];
const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Allow(Target::Fn), // const fn denied in check_attr
Allow(Target::Method(MethodKind::Inherent)),
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
Allow(Target::Static),
Allow(Target::ForeignStatic),
Allow(Target::ForeignStatic), // extern static mut denied in check_attr
Allow(Target::ForeignFn),
Warn(Target::Method(MethodKind::Trait { body: false })), // Not inherited
]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: [
"available_externally",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub(crate) struct RustcParenSugarParser;
impl NoArgsAttributeParser for RustcParenSugarParser {
const PATH: &[Symbol] = &[sym::rustc_paren_sugar];
const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
const STABILITY: AttributeStability = unstable!(rustc_attrs);
const STABILITY: AttributeStability = unstable!(unboxed_closures);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcParenSugar;
}

Expand Down
6 changes: 2 additions & 4 deletions compiler/rustc_attr_parsing/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,8 @@ impl<'a, 'sess> MetaItemListParserContext<'a, 'sess> {
// don't `uninterpolate` the token to avoid suggesting anything butchered or questionable
// when macro metavariables are involved.
let snapshot = self.parser.create_snapshot_for_diagnostic();
let stmt = self.parser.parse_stmt_without_recovery(false, ForceCollect::No, false);
match stmt {
Ok(Some(stmt)) => {
match self.parser.parse_stmt_without_recovery(false, ForceCollect::No, false) {
Ok(stmt) => {
// The user tried to write something like
// `#[deprecated(note = concat!("a", "b"))]`.
err.descr = stmt.kind.descr().to_string();
Expand Down Expand Up @@ -692,7 +691,6 @@ impl<'a, 'sess> MetaItemListParserContext<'a, 'sess> {
});
}
}
Ok(None) => {}
Err(e) => {
e.cancel();
self.parser.restore_snapshot(snapshot);
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_builtin_macros/src/cfg_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ impl CfgEval<'_> {
Annotatable::ForeignItem(self.flat_map_foreign_item(item).pop().unwrap())
}
Annotatable::Stmt(_) => {
let stmt = parser
.parse_stmt_without_recovery(false, ForceCollect::Yes, false)?
.unwrap();
let stmt =
parser.parse_stmt_without_recovery(false, ForceCollect::Yes, false)?;
Annotatable::Stmt(Box::new(self.flat_map_stmt(stmt).pop().unwrap()))
}
Annotatable::Expr(_) => {
Expand Down
10 changes: 2 additions & 8 deletions compiler/rustc_codegen_ssa/src/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,10 @@ fn process_builtin_attrs(
codegen_fn_attrs.import_linkage = linkage;

if tcx.is_mutable_static(did.into()) {
let mut diag = tcx.dcx().struct_span_err(
tcx.dcx().span_delayed_bug(
*span,
"extern mutable statics are not allowed with `#[linkage]`",
"`extern { #[linkage] static mut ...` is checked in check_attr}",
);
diag.note(
"marking the extern static mutable would allow changing which \
symbol the static references rather than make the target of the \
symbol mutable",
);
diag.emit();
}
} else {
codegen_fn_attrs.linkage = linkage;
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_codegen_ssa/src/mir/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {

PassMode::Direct(_) | PassMode::Pair(..) => {
let op = self.codegen_consume(bx, mir::Place::return_place().as_ref());
if let Ref(place_val) = op.val {
bx.load_from_place(bx.backend_type(op.layout), place_val)
} else {
op.immediate_or_packed_pair(bx)
match op.val {
Ref(place_val) => bx.load_from_place(bx.backend_type(op.layout), place_val),
Uninit => bx.cx().const_undef(bx.cx().immediate_backend_type(op.layout)),
_ => op.immediate_or_packed_pair(bx),
}
}

Expand Down
13 changes: 2 additions & 11 deletions compiler/rustc_data_structures/src/svh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,8 @@ use rustc_macros::{Decodable_NoContext, Encodable_NoContext, StableHash};

use crate::fingerprint::Fingerprint;

#[derive(
Copy,
Clone,
PartialEq,
Eq,
Debug,
Encodable_NoContext,
Decodable_NoContext,
Hash,
StableHash
)]
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
#[derive(Encodable_NoContext, Decodable_NoContext, StableHash)]
pub struct Svh {
hash: Fingerprint,
}
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1120,9 +1120,7 @@ pub fn parse_ast_fragment<'a>(
let mut stmts = SmallVec::new();
// Won't make progress on a `}`.
while this.token != token::Eof && this.token != token::CloseBrace {
if let Some(stmt) = this.parse_full_stmt(AttemptLocalParseRecovery::Yes)? {
stmts.push(stmt);
}
stmts.push(this.parse_full_stmt(AttemptLocalParseRecovery::Yes)?);
}
AstFragment::Stmts(stmts)
}
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_hir/src/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ macro_rules! arena_types {
$macro!([
// HIR types
[] asm_template: rustc_ast::InlineAsmTemplatePiece,
[] attribute: rustc_hir::Attribute,
[] owner_info: rustc_hir::OwnerInfo<'tcx>,
[] attribute: crate::Attribute,
[] owner_info: crate::OwnerInfo<'tcx>,
[] macro_def: rustc_ast::MacroDef,
[] delegation_info: rustc_hir::DelegationInfo,
[] delegation_info: crate::DelegationInfo,
]);
)
}
20 changes: 4 additions & 16 deletions compiler/rustc_hir/src/attrs/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use rustc_ast::{AttrStyle, Path, ast};
use rustc_data_structures::Limit;
use rustc_data_structures::fx::FxIndexMap;
use rustc_error_messages::{DiagArgValue, IntoDiagArg};
use rustc_hir::LangItem;
use rustc_macros::{Decodable, Encodable, PrintAttribute, StableHash};
use rustc_span::def_id::DefId;
use rustc_span::hygiene::Transparency;
Expand All @@ -22,7 +21,7 @@ use thin_vec::ThinVec;

use crate::attrs::diagnostic::*;
use crate::attrs::pretty_printing::PrintAttribute;
use crate::{DefaultBodyStability, PartialConstStability, RustcVersion, Stability};
use crate::{DefaultBodyStability, LangItem, PartialConstStability, RustcVersion, Stability};

#[derive(Copy, Clone, Debug, StableHash, Encodable, Decodable, PrintAttribute)]
pub enum EiiImplResolution {
Expand All @@ -40,7 +39,7 @@ pub enum EiiImplResolution {
#[derive(Copy, Clone, Debug, StableHash, Encodable, Decodable, PrintAttribute)]
pub struct EiiImpl {
pub resolution: EiiImplResolution,
pub impl_marked_unsafe: bool,
pub impl_unsafe_span: Option<Span>,
pub span: Span,
pub inner_span: Span,
pub is_default: bool,
Expand Down Expand Up @@ -370,19 +369,8 @@ pub enum PeImportNameType {
Undecorated,
}

#[derive(
Copy,
Clone,
Debug,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Encodable,
Decodable,
PrintAttribute
)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Encodable, Decodable, PrintAttribute)]
#[derive(StableHash)]
pub enum NativeLibKind {
/// Static library (e.g. `libfoo.a` on Linux or `foo.lib` on Windows/MSVC)
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_hir/src/attrs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ macro_rules! find_attr {
'done: {
for i in $attributes_list {
#[allow(unused_imports)]
use rustc_hir::attrs::AttributeKind::*;
let i: &rustc_hir::Attribute = i;
use $crate::attrs::AttributeKind::*;
let i: &$crate::Attribute = i;
match i {
rustc_hir::Attribute::Parsed($pattern) $(if $guard)? => {
$crate::Attribute::Parsed($pattern) $(if $guard)? => {
break 'done Some($e);
}
rustc_hir::Attribute::Unparsed(..) => {}
$crate::Attribute::Unparsed(..) => {}
// In lint emitting, there's a specific exception for this warning.
// It's not usually emitted from inside macros from other crates
// (see https://github.com/rust-lang/rust/issues/110613)
Expand Down
98 changes: 46 additions & 52 deletions compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,71 +114,65 @@ pub trait HirTyCtxt<'hir> {
fn hir_foreign_item(&self, id: ForeignItemId) -> &'hir ForeignItem<'hir>;
}

// Used when no tcx is actually available, forcing manual implementation of nested visitors.
/// Used when no tcx is actually available, forcing manual implementation of nested visitors.
impl<'hir> HirTyCtxt<'hir> for ! {
fn hir_node(&self, _: HirId) -> Node<'hir> {
unreachable!();
*self
}
fn hir_body(&self, _: BodyId) -> &'hir Body<'hir> {
unreachable!();
*self
}
fn hir_item(&self, _: ItemId) -> &'hir Item<'hir> {
unreachable!();
*self
}
fn hir_trait_item(&self, _: TraitItemId) -> &'hir TraitItem<'hir> {
unreachable!();
*self
}
fn hir_impl_item(&self, _: ImplItemId) -> &'hir ImplItem<'hir> {
unreachable!();
*self
}
fn hir_foreign_item(&self, _: ForeignItemId) -> &'hir ForeignItem<'hir> {
unreachable!();
*self
}
}

pub mod nested_filter {
use super::HirTyCtxt;

/// Specifies what nested things a visitor wants to visit. By "nested
/// things", we are referring to bits of HIR that are not directly embedded
/// within one another but rather indirectly, through a table in the crate.
/// This is done to control dependencies during incremental compilation: the
/// non-inline bits of HIR can be tracked and hashed separately.
///
/// The most common choice is `OnlyBodies`, which will cause the visitor to
/// visit fn bodies for fns that it encounters, and closure bodies, but
/// skip over nested item-like things.
///
/// See the comments at [`rustc_hir::intravisit`] for more details on the overall
/// visit strategy.
pub trait NestedFilter<'hir> {
type MaybeTyCtxt: HirTyCtxt<'hir>;

/// Whether the visitor visits nested "item-like" things.
/// E.g., item, impl-item.
const INTER: bool;
/// Whether the visitor visits "intra item-like" things.
/// E.g., function body, closure, `AnonConst`
const INTRA: bool;
}

/// Do not visit any nested things. When you add a new
/// "non-nested" thing, you will want to audit such uses to see if
/// they remain valid.
///
/// Use this if you are only walking some particular kind of tree
/// (i.e., a type, or fn signature) and you don't want to thread a
/// `tcx` around.
pub struct None(());
impl NestedFilter<'_> for None {
type MaybeTyCtxt = !;
const INTER: bool = false;
const INTRA: bool = false;
}
/// Specifies what nested things a visitor wants to visit. By "nested
/// things", we are referring to bits of HIR that are not directly embedded
/// within one another but rather indirectly, through a table in the crate.
/// This is done to control dependencies during incremental compilation: the
/// non-inline bits of HIR can be tracked and hashed separately.
///
/// The most common choice is `OnlyBodies`, which will cause the visitor to
/// visit fn bodies for fns that it encounters, and closure bodies, but
/// skip over nested item-like things.
///
/// See the [module level documentation](self) for more details on the overall
/// visit strategy.
pub trait NestedFilter<'hir> {
type MaybeTyCtxt: HirTyCtxt<'hir>;

/// Whether the visitor visits nested "item-like" things.
/// E.g., item, impl-item.
const INTER: bool;
/// Whether the visitor visits "intra item-like" things.
/// E.g., function body, closure, `AnonConst`
const INTRA: bool;
}

/// Do not visit any nested things. When you add a new
/// "non-nested" thing, you will want to audit such uses to see if
/// they remain valid.
///
/// Use this if you are only walking some particular kind of tree
/// (i.e., a type, or fn signature) and you don't want to thread a
/// `tcx` around.
pub struct IgnoreNested(());
impl NestedFilter<'_> for IgnoreNested {
type MaybeTyCtxt = !;
const INTER: bool = false;
const INTRA: bool = false;
}

use nested_filter::NestedFilter;

/// Each method of the Visitor trait is a hook to be potentially
/// overridden. Each method's default implementation recursively visits
/// the substructure of the input via the corresponding `walk` method;
Expand Down Expand Up @@ -215,7 +209,7 @@ pub trait Visitor<'v>: Sized {
/// `visit_nested_XXX` methods. If a new `visit_nested_XXX` variant is
/// added in the future, it will cause a panic which can be detected
/// and fixed appropriately.
type NestedFilter: NestedFilter<'v> = nested_filter::None;
type NestedFilter: NestedFilter<'v> = IgnoreNested;

/// The result type of the `visit_*` methods. Can be either `()`,
/// or `ControlFlow<T>`.
Expand All @@ -226,16 +220,16 @@ pub trait Visitor<'v>: Sized {
fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt {
panic!(
"maybe_tcx must be implemented or consider using \
`type NestedFilter = nested_filter::None` (the default)"
`type NestedFilter = Skip` (the default)"
);
}

/// Invoked when a nested item is encountered. By default, when
/// `Self::NestedFilter` is `nested_filter::None`, this method does
/// `Self::NestedFilter` is `Skip`, this method does
/// nothing. **You probably don't want to override this method** --
/// instead, override [`Self::NestedFilter`] or use the "shallow" or
/// "deep" visit patterns described at
/// [`rustc_hir::intravisit`]. The only reason to override
/// [`intravisit`](self). The only reason to override
/// this method is if you want a nested pattern but cannot supply a
/// `TyCtxt`; see `maybe_tcx` for advice.
fn visit_nested_item(&mut self, id: ItemId) -> Self::Result {
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_hir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#![recursion_limit = "256"]
// tidy-alphabetical-end

extern crate self as rustc_hir;

mod arena;
pub mod attrs;
pub mod canonical_symbols;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_hir_analysis/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,9 +947,6 @@ fn trait_def(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::TraitDef {
let attrs = tcx.get_all_attrs(def_id);

let paren_sugar = find_attr!(attrs, RustcParenSugar);
if paren_sugar && !tcx.features().unboxed_closures() {
tcx.dcx().emit_err(diagnostics::ParenSugarAttribute { span: item.span });
}

// Only regular traits can be marker.
let is_marker = !is_alias && find_attr!(attrs, Marker);
Expand Down
Loading
Loading