Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
67fc269
Add autodiff support for x86_64 apple darwin
sgasho Jul 9, 2026
bb5b32e
Merge pull request #2920 from sgasho/autodiff-x86_64-apple
tshepang Jul 9, 2026
033d8ca
Add install notes for older rustup versions
ZuseZ4 Jul 9, 2026
09fe637
Merge pull request #2921 from rust-lang/rustup-enzyme-update
ZuseZ4 Jul 9, 2026
cb0ba93
Support EII on Windows MSVC
AsakuraMizu Jul 3, 2026
544edb8
Fix typo in ambig AST positions description
Kokoro2336 Jul 10, 2026
95b3bfc
Merge pull request #2923 from Kokoro2336/patch-1
tshepang Jul 10, 2026
4d0b593
Make `HasTokens` a sub-trait of `HasAttrs`.
nnethercote Jul 12, 2026
36ac828
Refresh diagnostic items date check
Bortlesboat Jul 13, 2026
7abc537
Suggest the `[const] Destruct` bound for type parameters in const fun…
jakubadamw Apr 8, 2026
4fca6bd
Bless tests affected by the `[const] Destruct` suggestion
jakubadamw Apr 8, 2026
2f961b8
Only offer the `[const] Destruct` suggestion on a nightly compiler
jakubadamw Jul 12, 2026
8c2ed2f
Introduce InstanceKind::LlvmIntrinsic
bjorn3 Jan 8, 2026
aec727f
Stop using EmulateItemResult for LLVM intrinsics in miri
bjorn3 Jul 13, 2026
8583c9a
Add regression test for issue 95719
Joel-Wwalker Jul 13, 2026
09882ef
inline Once wait and wait_force
vilgotf Jul 13, 2026
9561a52
Bump rustc-perf submodule
Kobzol Jul 13, 2026
5f35fc8
Replace shortened type with `_` instead of `...` as placeholder
estebank Jul 13, 2026
8e12609
Add regression test for issue 144033
Joel-Wwalker Jul 14, 2026
bf52201
Skip intrinsic-test when rustfmt is unavailable
xonx4l Jul 14, 2026
f3f4235
Simplify regression test for issue 144033
Joel-Wwalker Jul 14, 2026
ca15064
Add regression test
oli-obk Jun 12, 2026
5b3e95d
Add regression test
oli-obk Jun 12, 2026
7139a2b
disable range-len-try-from.rs on s390x
fneddy Jul 14, 2026
edbbeae
Update tidy licenses
Kobzol Jul 13, 2026
7d5c925
slice: make swap delegate to swap_unchecked
Rachit2323 Jul 14, 2026
661ae59
avoid duplicated Link reference definition
tshepang Jul 14, 2026
313c4f2
lighter markup
tshepang Jul 14, 2026
e866d9d
reflow
tshepang Jul 14, 2026
b182157
fix punctuation
tshepang Jul 14, 2026
dff3fde
Rename `std_crates_for_run_make` to `std_crates_for_make_run`
Zalathar Jul 14, 2026
070dd68
remove obsolete comment
tshepang Jul 14, 2026
d97dfee
sembr src/ambig-unambig-ty-and-consts.md
tshepang Jul 14, 2026
95362d8
improve ambig-unambig-ty-and-consts.md
tshepang Jul 14, 2026
887fb7e
sembr src/mir/optimizations.md
tshepang Jul 14, 2026
36c1fcd
lighter markup
tshepang Jul 14, 2026
c985b99
whitespace
tshepang Jul 14, 2026
75f10b7
sembr src/mir/debugging.md
tshepang Jul 14, 2026
6741f56
Add ´#[rustc_comptime]` inherent impls
oli-obk Jun 12, 2026
7951d5d
sembr src/mir/index.md
tshepang Jul 14, 2026
29668b5
Construct tokens for attrs made by mk_attr_word
mu001999 Jul 14, 2026
a8019c5
rerun if we meet any opaques in post analysis
adwinwhite Jul 8, 2026
c9528a4
improve mir/index.md
tshepang Jul 14, 2026
f2dacde
sembr src/mir/dataflow.md
tshepang Jul 14, 2026
084cbeb
improve mir/dataflow.md
tshepang Jul 14, 2026
ef46135
book title should be enough
tshepang Jul 14, 2026
ad50c18
sembr src/mir/passes.md
tshepang Jul 14, 2026
41ebf06
improve mir/passes.md
tshepang Jul 14, 2026
4e9b7c5
sembr src/mir/visitor.md
tshepang Jul 14, 2026
a4f7cd6
use plain english
tshepang Jul 14, 2026
ce63e67
sembr src/mir/drop-elaboration.md
tshepang Jul 14, 2026
1710ce1
clarity
tshepang Jul 14, 2026
60d5c32
unstable book: Document `diagnostic_on_unknown`
mejrs Jul 14, 2026
4d9f954
Remove obsolete verbose flag from deref/ref suggestions
reidliu41 Jul 14, 2026
48a980d
Store DefId instead of EiiDecl in EiiImplResolution::Known
cezarbbb Jun 22, 2026
52ab8f0
*. confused sembr tool
tshepang Jul 14, 2026
a1e7361
nit
tshepang Jul 14, 2026
ac3ddd6
sembr src/coroutine-closures.md
tshepang Jul 14, 2026
0c03df6
avoid inline external links
tshepang Jul 14, 2026
8e9528f
reflow
tshepang Jul 14, 2026
5e823b7
use sentence case for titles
tshepang Jul 14, 2026
c9fe6e7
Merge pull request #2926 from rust-lang/tshepang/misc
tshepang Jul 14, 2026
0ac4173
Merge pull request #2925 from Bortlesboat/docs/2914-diagnostic-items-…
tshepang Jul 14, 2026
cf4274e
replace a needless capitatlisation
tshepang Jul 14, 2026
22ac34b
sembr src/diagnostics/diagnostic-items.md
tshepang Jul 14, 2026
d8fca8c
missing pauses
tshepang Jul 14, 2026
ee0aa9a
less playful
tshepang Jul 14, 2026
16bc3b8
lighter markup
tshepang Jul 14, 2026
7bc6a3f
sembr src/rustbot.md
tshepang Jul 14, 2026
72b569c
lighter markup
tshepang Jul 14, 2026
fbdd738
Merge pull request #2927 from rust-lang/tshepang/nit
tshepang Jul 14, 2026
fe1d567
Rollup merge of #157824 - oli-obk:comptime-impls, r=fee1-dead
JonathanBrouwer Jul 14, 2026
343aa4d
Rollup merge of #158235 - cezarbbb:eii-metadata-opt, r=bjorn3
JonathanBrouwer Jul 14, 2026
c39aae7
Rollup merge of #158723 - AsakuraMizu:windows-msvc-eii, r=bjorn3
JonathanBrouwer Jul 14, 2026
b1ad856
Rollup merge of #158993 - adwinwhite:rigid-opaque-in-codegen, r=jdons…
JonathanBrouwer Jul 14, 2026
1775b55
Rollup merge of #159160 - nnethercote:HasAttrs-HasTokens, r=petrochenkov
JonathanBrouwer Jul 14, 2026
6ae1ffe
Rollup merge of #159183 - bjorn3:instance_llvm_intrinsic, r=RalfJung,…
JonathanBrouwer Jul 14, 2026
f83cdee
Rollup merge of #159251 - Kobzol:update-rustc-perf, r=lqd
JonathanBrouwer Jul 14, 2026
e0ff091
Rollup merge of #155013 - jakubadamw:issue-103270, r=oli-obk
JonathanBrouwer Jul 14, 2026
a93a303
Rollup merge of #159155 - mejrs:doc_on_unknown, r=nnethercote
JonathanBrouwer Jul 14, 2026
57cc468
Rollup merge of #159235 - Joel-Wwalker:95719-regression-test, r=oli-obk
JonathanBrouwer Jul 14, 2026
f24f5ef
Rollup merge of #159243 - vilgotf:once-inline, r=joboet
JonathanBrouwer Jul 14, 2026
f2c3af2
Rollup merge of #159255 - estebank:shortened-ty-placeholder, r=Kivooeo
JonathanBrouwer Jul 14, 2026
6ba410c
Rollup merge of #159259 - Joel-Wwalker:144033-regression-test, r=Kivooeo
JonathanBrouwer Jul 14, 2026
2d28f60
Rollup merge of #159265 - xonx4l:skip-intrinsic-test-missing-rustfmt,…
JonathanBrouwer Jul 14, 2026
230fa8c
Rollup merge of #159269 - fneddy:disable-test-rltf, r=folkertdev
JonathanBrouwer Jul 14, 2026
838dc40
Rollup merge of #159272 - Rachit2323:fix-slice-swap-use-swap-unchecke…
JonathanBrouwer Jul 14, 2026
e9203b9
Rollup merge of #159274 - Zalathar:did-you-mean-make-run, r=jieyouxu
JonathanBrouwer Jul 14, 2026
d6c593b
Rollup merge of #159275 - tshepang:patch-2, r=Kivooeo
JonathanBrouwer Jul 14, 2026
1f893c1
Rollup merge of #159277 - mu001999-contrib:fix-159261, r=jdonszelmann
JonathanBrouwer Jul 14, 2026
95df0de
Rollup merge of #159283 - reidliu41:cleanup-obsolete-suggestion-verbo…
JonathanBrouwer Jul 14, 2026
b7a7582
Rollup merge of #159290 - tshepang:rdg-sync, r=tshepang
JonathanBrouwer Jul 14, 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
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3915,7 +3915,7 @@ pub struct EiiImpl {
///
/// This field is that shortcut: we prefill the extern target to skip a name resolution step,
/// making sure it never fails. It'd be awful UX if we fail name resolution in code invisible to the user.
pub known_eii_macro_resolution: Option<EiiDecl>,
pub known_eii_macro_resolution: Option<Path>,
pub impl_safety: Safety,
pub span: Span,
pub inner_span: Span,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast/src/ast_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl<T: HasNodeId> HasNodeId for Box<T> {
}

/// A trait for AST nodes having (or not having) collected tokens.
pub trait HasTokens {
pub trait HasTokens: HasAttrs {
fn tokens(&self) -> Option<&LazyAttrTokenStream>;
fn tokens_mut(&mut self) -> Option<&mut Option<LazyAttrTokenStream>>;
}
Expand Down Expand Up @@ -109,7 +109,7 @@ impl_has_tokens_none!(
WherePredicate
);

impl<T> HasTokens for WithTokens<T> {
impl<T: HasAttrs> HasTokens for WithTokens<T> {
fn tokens(&self) -> Option<&LazyAttrTokenStream> {
self.tokens.as_ref()
}
Expand Down
135 changes: 113 additions & 22 deletions compiler/rustc_ast/src/attr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::fmt::Debug;
use std::sync::atomic::{AtomicU32, Ordering};

use rustc_index::bit_set::GrowableBitSet;
use rustc_span::{Ident, Span, Symbol, sym};
use rustc_span::{Ident, Span, Symbol, kw, sym};
use smallvec::{SmallVec, smallvec};
use thin_vec::{ThinVec, thin_vec};

Expand All @@ -21,7 +21,8 @@ use crate::token::{
self, CommentKind, Delimiter, DocFragmentKind, InvisibleOrigin, MetaVarKind, Token,
};
use crate::tokenstream::{
DelimSpan, LazyAttrTokenStream, Spacing, TokenStream, TokenStreamIter, TokenTree,
AttrTokenStream, AttrTokenTree, DelimSpacing, DelimSpan, LazyAttrTokenStream, Spacing,
TokenStream, TokenStreamIter, TokenTree,
};
use crate::util::comments;
use crate::util::literal::escape_string_symbol;
Expand Down Expand Up @@ -737,23 +738,6 @@ pub fn mk_doc_comment(
Attribute { kind: AttrKind::DocComment(comment_kind, data), id: g.mk_attr_id(), style, span }
}

fn mk_attr(
g: &AttrIdGenerator,
style: AttrStyle,
unsafety: Safety,
path: Path,
args: AttrArgs,
span: Span,
) -> Attribute {
mk_attr_from_item(
g,
AttrItem { unsafety, path, args: AttrItemKind::Unparsed(args) },
None,
style,
span,
)
}

pub fn mk_attr_from_item(
g: &AttrIdGenerator,
item: AttrItem,
Expand All @@ -769,6 +753,50 @@ pub fn mk_attr_from_item(
}
}

fn mk_attr_tokens(
style: AttrStyle,
unsafety: Safety,
item_tokens: AttrTokenStream,
span: Span,
) -> LazyAttrTokenStream {
let safety_kw = match unsafety {
Safety::Default => None,
Safety::Unsafe(span) => Some((kw::Unsafe, span)),
Safety::Safe(span) => Some((kw::Safe, span)),
};
let item_tokens = if let Some((kw, kw_span)) = safety_kw {
AttrTokenStream::new(vec![
AttrTokenTree::Token(Token::from_ast_ident(Ident::new(kw, kw_span)), Spacing::Alone),
AttrTokenTree::Delimited(
DelimSpan::from_single(span),
DelimSpacing::new(Spacing::JointHidden, Spacing::Alone),
Delimiter::Parenthesis,
item_tokens,
),
])
} else {
item_tokens
};

let mut tokens = match style {
AttrStyle::Outer => {
vec![AttrTokenTree::Token(Token::new(token::Pound, span), Spacing::JointHidden)]
}
AttrStyle::Inner => vec![
AttrTokenTree::Token(Token::new(token::Pound, span), Spacing::Joint),
AttrTokenTree::Token(Token::new(token::Bang, span), Spacing::JointHidden),
],
};
tokens.push(AttrTokenTree::Delimited(
DelimSpan::from_single(span),
DelimSpacing::new(Spacing::JointHidden, Spacing::Alone),
Delimiter::Bracket,
item_tokens,
));

LazyAttrTokenStream::new_direct(AttrTokenStream::new(tokens))
}

pub fn mk_attr_word(
g: &AttrIdGenerator,
style: AttrStyle,
Expand All @@ -778,7 +806,24 @@ pub fn mk_attr_word(
) -> Attribute {
let path = Path::from_ident(Ident::new(name, span));
let args = AttrArgs::Empty;
mk_attr(g, style, unsafety, path, args, span)

let tokens = Some(mk_attr_tokens(
style,
unsafety,
AttrTokenStream::new(vec![AttrTokenTree::Token(
Token::from_ast_ident(Ident::new(name, span)),
Spacing::Alone,
)]),
span,
));

mk_attr_from_item(
g,
AttrItem { unsafety, path, args: AttrItemKind::Unparsed(args) },
tokens,
style,
span,
)
}

pub fn mk_attr_nested_word(
Expand All @@ -800,7 +845,32 @@ pub fn mk_attr_nested_word(
delim: Delimiter::Parenthesis,
tokens: inner_tokens,
});
mk_attr(g, style, unsafety, path, attr_args, span)

let tokens = Some(mk_attr_tokens(
style,
unsafety,
AttrTokenStream::new(vec![
AttrTokenTree::Token(Token::from_ast_ident(Ident::new(outer, span)), Spacing::Alone),
AttrTokenTree::Delimited(
DelimSpan::from_single(span),
DelimSpacing::new(Spacing::JointHidden, Spacing::Alone),
Delimiter::Parenthesis,
AttrTokenStream::new(vec![AttrTokenTree::Token(
Token::from_ast_ident(Ident::new(inner, span)),
Spacing::Alone,
)]),
),
]),
span,
));

mk_attr_from_item(
g,
AttrItem { unsafety, path, args: AttrItemKind::Unparsed(attr_args) },
tokens,
style,
span,
)
}

pub fn mk_attr_name_value_str(
Expand All @@ -821,7 +891,28 @@ pub fn mk_attr_name_value_str(
});
let path = Path::from_ident(Ident::new(name, span));
let args = AttrArgs::Eq { eq_span: span, expr };
mk_attr(g, style, unsafety, path, args, span)

let tokens = Some(mk_attr_tokens(
style,
unsafety,
AttrTokenStream::new(vec![
AttrTokenTree::Token(Token::from_ast_ident(Ident::new(name, span)), Spacing::Alone),
AttrTokenTree::Token(Token::new(token::Eq, span), Spacing::Alone),
AttrTokenTree::Token(
Token::new(token::TokenKind::lit(lit.kind, lit.symbol, lit.suffix), span),
Spacing::Alone,
),
]),
span,
));

mk_attr_from_item(
g,
AttrItem { unsafety, path, args: AttrItemKind::Unparsed(args) },
tokens,
style,
span,
)
}

pub fn filter_by_name(attrs: &[Attribute], name: Symbol) -> impl Iterator<Item = &Attribute> {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast/src/tokenstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use rustc_span::{DUMMY_SP, Span, SpanDecoder, SpanEncoder, Symbol, sym};
use thin_vec::ThinVec;

use crate::ast::AttrStyle;
use crate::ast_traits::{HasAttrs, HasTokens};
use crate::ast_traits::HasTokens;
use crate::token::{self, Delimiter, Token, TokenKind};
use crate::{AttrVec, Attribute};

Expand Down Expand Up @@ -653,7 +653,7 @@ impl TokenStream {
TokenStream::new(vec![TokenTree::token_alone(kind, span)])
}

pub fn from_ast(node: &(impl HasAttrs + HasTokens + fmt::Debug)) -> TokenStream {
pub fn from_ast(node: &(impl HasTokens + fmt::Debug)) -> TokenStream {
let tokens = node.tokens().unwrap_or_else(|| panic!("missing tokens for node: {:?}", node));
let mut tts = vec![];
attrs_and_tokens_to_token_trees(node.attrs(), tokens, &mut tts);
Expand Down
6 changes: 4 additions & 2 deletions compiler/rustc_ast_lowering/src/expr/closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
&closure.body,
closure.fn_decl_span,
closure.fn_arg_span,
attrs,
),
span: self.lower_span(e.span),
},
Expand Down Expand Up @@ -240,7 +241,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
fn_decl_span: self.lower_span(fn_decl_span),
fn_arg_span: Some(self.lower_span(fn_arg_span)),
kind: closure_kind,
constness: self.lower_constness(constness),
constness: self.lower_constness(attrs, constness),
explicit_captures,
});

Expand Down Expand Up @@ -308,6 +309,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
body: &Expr,
fn_decl_span: Span,
fn_arg_span: Span,
attrs: &[hir::Attribute],
) -> hir::ExprKind<'hir> {
let closure_def_id = self.local_def_id(closure_id);
let (binder_clause, generic_params) = self.lower_closure_binder(binder);
Expand Down Expand Up @@ -369,7 +371,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
// knows that a `FnDecl` output type like `-> &str` actually means
// "coroutine that returns &str", rather than directly returning a `&str`.
kind: hir::ClosureKind::CoroutineClosure(coroutine_desugaring),
constness: self.lower_constness(constness),
constness: self.lower_constness(attrs, constness),
explicit_captures: &[],
});
hir::ExprKind::Closure(c)
Expand Down
55 changes: 28 additions & 27 deletions compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
}: &EiiImpl,
) -> hir::attrs::EiiImpl {
let resolution = if let Some(target) = known_eii_macro_resolution
&& let Some(decl) = self.lower_eii_decl(
*node_id,
// the expect is ok here since we always generate this path in the eii macro.
eii_macro_path.segments.last().expect("at least one segment").ident,
target,
) {
EiiImplResolution::Known(decl)
&& let Some(foreign_item_did) = self.lower_path_simple_eii(*node_id, target)
{
EiiImplResolution::Known(foreign_item_did)
} else if let Some(macro_did) = self.lower_path_simple_eii(*node_id, eii_macro_path) {
EiiImplResolution::Macro(macro_did)
} else {
Expand Down Expand Up @@ -479,7 +475,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
.arena
.alloc_from_iter(impl_items.iter().map(|item| self.lower_impl_item_ref(item)));

let constness = self.lower_constness(*constness);
let constness = self.lower_constness(attrs, *constness);

hir::ItemKind::Impl(hir::Impl {
generics,
Expand All @@ -499,7 +495,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
bounds,
items,
}) => {
let constness = self.lower_constness(*constness);
let constness = self.lower_constness(attrs, *constness);
let impl_restriction = self.lower_impl_restriction(impl_restriction);
let ident = self.lower_ident(*ident);
let (generics, (safety, items, bounds)) = self.lower_generics(
Expand Down Expand Up @@ -530,7 +526,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
}
}
ItemKind::TraitAlias(TraitAlias { constness, ident, generics, bounds }) => {
let constness = self.lower_constness(*constness);
let constness = self.lower_constness(attrs, *constness);
let ident = self.lower_ident(*ident);
let (generics, bounds) = self.lower_generics(
generics,
Expand Down Expand Up @@ -1702,21 +1698,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
safety.into()
};

let mut constness = self.lower_constness(h.constness);
if let Some(&attr_span) = find_attr!(attrs, RustcComptime(span) => span) {
match std::mem::replace(&mut constness, rustc_hir::Constness::Const { always: true }) {
rustc_hir::Constness::Const { always: true } => {
unreachable!("lower_constness cannot produce comptime")
}
// A function can't be `const` and `comptime` at the same time
rustc_hir::Constness::Const { always: false } => {
let Const::Yes(span) = h.constness else { unreachable!() };
self.dcx().emit_err(ConstComptimeFn { span, attr_span });
}
// Good
rustc_hir::Constness::NotConst => {}
}
}
let constness = self.lower_constness(attrs, h.constness);

hir::FnHeader { safety, asyncness, constness, abi: self.lower_extern(h.ext) }
}
Expand Down Expand Up @@ -1778,11 +1760,30 @@ impl<'hir> LoweringContext<'_, 'hir> {
});
}

pub(super) fn lower_constness(&mut self, c: Const) -> hir::Constness {
match c {
/// Lowers constness or comptime attribute.
/// Whether `const` is allowed here is checked by ast validation.
/// Whether `comptime` is allowed here is checked by the `comptime` attribute parser.
pub(super) fn lower_constness(&mut self, attrs: &[hir::Attribute], c: Const) -> hir::Constness {
let mut constness = match c {
Const::Yes(_) => hir::Constness::Const { always: false },
Const::No => hir::Constness::NotConst,
};

if let Some(&attr_span) = find_attr!(attrs, RustcComptime(span) => span) {
match std::mem::replace(&mut constness, hir::Constness::Const { always: true }) {
hir::Constness::Const { always: true } => {
unreachable!("lower_constness cannot produce comptime")
}
// A function can't be `const` and `comptime` at the same time
hir::Constness::Const { always: false } => {
let Const::Yes(span) = c else { unreachable!() };
self.dcx().emit_err(ConstComptimeFn { span, attr_span });
}
// Good
hir::Constness::NotConst => {}
}
}
constness
}

pub(super) fn lower_safety(&self, s: Safety, default: hir::Safety) -> hir::Safety {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/src/attributes/semantics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ impl NoArgsAttributeParser for ComptimeParser {
const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[
Allow(Target::Method(MethodKind::Inherent)),
Allow(Target::Fn),
Allow(Target::Impl { of_trait: false }),
]);
const STABILITY: AttributeStability = unstable!(rustc_attrs);
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcComptime;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_builtin_macros/src/cfg_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::ops::ControlFlow;
use rustc_ast as ast;
use rustc_ast::mut_visit::MutVisitor;
use rustc_ast::visit::{AssocCtxt, Visitor};
use rustc_ast::{Attribute, HasAttrs, HasTokens, NodeId, mut_visit, visit};
use rustc_ast::{Attribute, HasTokens, NodeId, mut_visit, visit};
use rustc_errors::PResult;
use rustc_expand::base::{Annotatable, ExtCtxt};
use rustc_expand::config::StripUnconfigured;
Expand Down Expand Up @@ -67,7 +67,7 @@ fn has_cfg_or_cfg_attr(annotatable: &Annotatable) -> bool {
}

impl CfgEval<'_> {
fn configure<T: HasAttrs + HasTokens>(&mut self, node: T) -> Option<T> {
fn configure<T: HasTokens>(&mut self, node: T) -> Option<T> {
self.0.configure(node)
}

Expand Down
Loading
Loading