Skip to content

Commit 0d64a5f

Browse files
Use the current lint note id when parsing cfg!()
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
1 parent 87f9dcd commit 0d64a5f

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)