Skip to content

Commit fc78d78

Browse files
committed
MCP636: Adapt check-cfg tests to the new syntax
1 parent e5e95eb commit fc78d78

File tree

68 files changed

+749
-124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+749
-124
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// check-fail
2-
// compile-flags: --check-cfg=names()
2+
// compile-flags: --check-cfg=cfg()

tests/rustdoc-ui/check-cfg/check-cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// check-pass
2-
// compile-flags: --check-cfg=names() -Z unstable-options
2+
// compile-flags: --check-cfg=cfg() -Z unstable-options
33

44
/// uniz is nor a builtin nor pass as arguments so is unexpected
55
#[cfg(uniz)]

tests/rustdoc-ui/doctest/check-cfg-test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// check-pass
2-
// compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options
2+
// compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options
33
// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
44
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
55
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

tests/ui/check-cfg/allow-at-crate-level.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test check that #![allow(unexpected_cfgs)] works with --cfg
22
//
33
// check-pass
4-
// compile-flags: --cfg=unexpected --check-cfg=names() -Z unstable-options
4+
// compile-flags: --cfg=unexpected --check-cfg=cfg() -Z unstable-options
55

66
#![allow(unexpected_cfgs)]
77

tests/ui/check-cfg/allow-macro-cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test check that local #[allow(unexpected_cfgs)] works
22
//
33
// check-pass
4-
// compile-flags:--check-cfg=names() -Z unstable-options
4+
// compile-flags: --check-cfg=cfg() -Z unstable-options
55

66
#[allow(unexpected_cfgs)]
77
fn foo() {

tests/ui/check-cfg/allow-same-level.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test check that #[allow(unexpected_cfgs)] doesn't work if put on the same level
22
//
33
// check-pass
4-
// compile-flags:--check-cfg=names() -Z unstable-options
4+
// compile-flags: --check-cfg=cfg() -Z unstable-options
55

66
#[allow(unexpected_cfgs)]
77
#[cfg(FALSE)]

tests/ui/check-cfg/allow-top-level.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test check that a top-level #![allow(unexpected_cfgs)] works
22
//
33
// check-pass
4-
// compile-flags:--check-cfg=names() -Z unstable-options
4+
// compile-flags: --check-cfg=cfg() -Z unstable-options
55

66
#![allow(unexpected_cfgs)]
77

tests/ui/check-cfg/allow-upper-level.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test check that #[allow(unexpected_cfgs)] work if put on an upper level
22
//
33
// check-pass
4-
// compile-flags:--check-cfg=names() -Z unstable-options
4+
// compile-flags: --check-cfg=cfg() -Z unstable-options
55

66
#[allow(unexpected_cfgs)]
77
mod aa {

tests/ui/check-cfg/compact-names.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test check that we correctly emit an warning for compact cfg
22
//
33
// check-pass
4-
// compile-flags:--check-cfg=names() -Z unstable-options
4+
// compile-flags: --check-cfg=cfg() -Z unstable-options
55

66
#![feature(cfg_target_compact)]
77

tests/ui/check-cfg/compact-values.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test check that we correctly emit an warning for compact cfg
22
//
33
// check-pass
4-
// compile-flags:--check-cfg=values() -Z unstable-options
4+
// compile-flags: --check-cfg=cfg() -Z unstable-options
55

66
#![feature(cfg_target_compact)]
77

0 commit comments

Comments
 (0)