1
Fork 0

Improve allowness of the unexpected_cfgs lint

This commit is contained in:
Loïc BRANSTETT 2022-02-27 22:26:24 +01:00
parent d3ad51b48f
commit 765205b9b8
14 changed files with 122 additions and 26 deletions

View file

@ -1,4 +1,5 @@
use rustc_arena::TypedArena;
use rustc_ast::CRATE_NODE_ID;
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
use rustc_data_structures::memmap::Mmap;
use rustc_data_structures::temp_dir::MaybeTempDir;
@ -2434,7 +2435,7 @@ fn add_upstream_native_libraries(
fn relevant_lib(sess: &Session, lib: &NativeLib) -> bool {
match lib.cfg {
Some(ref cfg) => rustc_attr::cfg_matches(cfg, &sess.parse_sess, None),
Some(ref cfg) => rustc_attr::cfg_matches(cfg, &sess.parse_sess, CRATE_NODE_ID, None),
None => true,
}
}