Skip to content

Commit 32907f0

Browse files
authored
Unrolled build for #148711
Rollup merge of #148711 - JonathanBrouwer:cfg_macro_lint_node_id, r=Kivooeo Use the current lint note id when parsing `cfg!()`
2 parents acda5e9 + 0d64a5f commit 32907f0

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_builtin_macros/src

1 file changed

+2
-2
lines changed

compiler/rustc_builtin_macros/src/cfg.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! current compilation environment.
44
55
use rustc_ast::tokenstream::TokenStream;
6-
use rustc_ast::{AttrStyle, CRATE_NODE_ID, token};
6+
use rustc_ast::{AttrStyle, token};
77
use rustc_attr_parsing as attr;
88
use rustc_attr_parsing::parser::MetaItemOrLitParser;
99
use rustc_attr_parsing::{
@@ -57,7 +57,7 @@ fn parse_cfg(cx: &ExtCtxt<'_>, span: Span, tts: TokenStream) -> Result<CfgEntry,
5757
AttrPath { segments: vec![Ident::from_str("cfg")].into_boxed_slice(), span },
5858
ParsedDescription::Macro,
5959
span,
60-
CRATE_NODE_ID,
60+
cx.current_expansion.lint_node_id,
6161
Some(cx.ecfg.features),
6262
ShouldEmit::ErrorsAndLints,
6363
&meta,

0 commit comments

Comments
 (0)