Skip to content

Commit 92013a8

Browse files
committed
Turn on cfg format warnings
1 parent fa6b2d4 commit 92013a8

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

src/libsyntax/attr.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,11 @@ pub fn cfg_matches(diagnostic: &SpanHandler, cfgs: &[P<MetaItem>], cfg: &ast::Me
315315
ast::MetaList(ref pred, ref mis) if pred.get() == "all" =>
316316
mis.iter().all(|mi| cfg_matches(diagnostic, cfgs, &**mi)),
317317
ast::MetaList(ref pred, ref mis) if pred.get() == "not" => {
318-
// NOTE: turn on after snapshot
319-
/*
320318
if mis.len() != 1 {
321319
diagnostic.span_warn(cfg.span, "the use of multiple cfgs in the same `not` \
322320
statement is deprecated. Change `not(a, b)` to \
323321
`not(all(a, b))`.");
324322
}
325-
*/
326323
!mis.iter().all(|mi| cfg_matches(diagnostic, cfgs, &**mi))
327324
}
328325
ast::MetaList(ref pred, _) => {

src/libsyntax/config.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,6 @@ fn in_cfg(diagnostic: &SpanHandler, cfg: &[P<ast::MetaItem>], attrs: &[ast::Attr
260260
_ => continue
261261
};
262262

263-
// NOTE: turn on after snapshot
264-
/*
265263
if mis.len() != 1 {
266264
diagnostic.span_warn(attr.span, "The use of multiple cfgs in the top level of \
267265
`#[cfg(..)]` is deprecated. Change `#[cfg(a, b)]` to \
@@ -274,7 +272,6 @@ fn in_cfg(diagnostic: &SpanHandler, cfg: &[P<ast::MetaItem>], attrs: &[ast::Attr
274272
the intersection of the cfgs. Change `#[cfg(a)] \
275273
#[cfg(b)]` to `#[cfg(any(a, b))]`.");
276274
}
277-
*/
278275

279276
seen_cfg = true;
280277
in_cfg |= mis.iter().all(|mi| attr::cfg_matches(diagnostic, cfg, &**mi));

src/libsyntax/ext/cfg.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ pub fn expand_cfg<'cx>(cx: &mut ExtCtxt,
3838
p.expect(&token::COMMA);
3939
}
4040

41-
// NOTE: turn on after snapshot
42-
/*
4341
if cfgs.len() != 1 {
4442
cx.span_warn(sp, "The use of multiple cfgs at the top level of `cfg!` \
4543
is deprecated. Change `cfg!(a, b)` to \
4644
`cfg!(all(a, b))`.");
4745
}
48-
*/
4946

5047
let matches_cfg = cfgs.iter().all(|cfg| attr::cfg_matches(&cx.parse_sess.span_diagnostic,
5148
cx.cfg.as_slice(), &**cfg));

0 commit comments

Comments
 (0)