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

@ -19,7 +19,12 @@ pub fn expand_cfg(
match parse_cfg(cx, sp, tts) {
Ok(cfg) => {
let matches_cfg = attr::cfg_matches(&cfg, &cx.sess.parse_sess, cx.ecfg.features);
let matches_cfg = attr::cfg_matches(
&cfg,
&cx.sess.parse_sess,
cx.current_expansion.lint_node_id,
cx.ecfg.features,
);
MacEager::expr(cx.expr_bool(sp, matches_cfg))
}
Err(mut err) => {