Use the current lint note id when parsing cfg!()
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
This commit is contained in:
parent
87f9dcd5e2
commit
0d64a5f467
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
//! current compilation environment.
|
||||
|
||||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_ast::{AttrStyle, CRATE_NODE_ID, token};
|
||||
use rustc_ast::{AttrStyle, token};
|
||||
use rustc_attr_parsing as attr;
|
||||
use rustc_attr_parsing::parser::MetaItemOrLitParser;
|
||||
use rustc_attr_parsing::{
|
||||
|
|
@ -57,7 +57,7 @@ fn parse_cfg(cx: &ExtCtxt<'_>, span: Span, tts: TokenStream) -> Result<CfgEntry,
|
|||
AttrPath { segments: vec![Ident::from_str("cfg")].into_boxed_slice(), span },
|
||||
ParsedDescription::Macro,
|
||||
span,
|
||||
CRATE_NODE_ID,
|
||||
cx.current_expansion.lint_node_id,
|
||||
Some(cx.ecfg.features),
|
||||
ShouldEmit::ErrorsAndLints,
|
||||
&meta,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue