Improve allowness of the unexpected_cfgs lint
This commit is contained in:
parent
d3ad51b48f
commit
765205b9b8
14 changed files with 122 additions and 26 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue