mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-04 17:22:19 +00:00
Fix tests/ui/rust-2018/removing-extern-crate-malformed-cfg.rs test
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use std::iter;
|
||||
|
||||
use rustc_ast::attr::data_structures::CfgEntry;
|
||||
use rustc_ast::token::{Delimiter, Token, TokenKind};
|
||||
use rustc_ast::tokenstream::{
|
||||
AttrTokenStream, AttrTokenTree, LazyAttrTokenStream, Spacing, TokenTree, WithTokens,
|
||||
@@ -254,7 +255,10 @@ impl<'a> StripUnconfigured<'a> {
|
||||
self.features,
|
||||
self.lint_node_id,
|
||||
) else {
|
||||
return vec![];
|
||||
let trace_attr = cfg_attr.clone().convert_normal_to_synthetic(
|
||||
SyntheticAttr::CfgAttrTrace(CfgEntry::Bool(true, cfg_attr.span)),
|
||||
);
|
||||
return vec![trace_attr];
|
||||
};
|
||||
|
||||
// Lint on zero attributes in source.
|
||||
|
||||
Reference in New Issue
Block a user