diff options
| author | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-07-07 09:10:38 +0200 |
|---|---|---|
| committer | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-07-15 09:21:27 +0200 |
| commit | c7f5ddc09871dc74c9f451435b042707eef5dc6c (patch) | |
| tree | 263277570b049f70da71b635970048ebb434efda /tests/ui/check-cfg | |
| parent | 6133c676d7b5e025121c858c4e7942cce70adf27 (diff) | |
| download | rust-c7f5ddc09871dc74c9f451435b042707eef5dc6c.tar.gz rust-c7f5ddc09871dc74c9f451435b042707eef5dc6c.zip | |
Changes to diagnostics
Diffstat (limited to 'tests/ui/check-cfg')
| -rw-r--r-- | tests/ui/check-cfg/compact-names.rs | 4 | ||||
| -rw-r--r-- | tests/ui/check-cfg/compact-names.stderr | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/ui/check-cfg/compact-names.rs b/tests/ui/check-cfg/compact-names.rs index 931afdf986f..fbf8f9d2002 100644 --- a/tests/ui/check-cfg/compact-names.rs +++ b/tests/ui/check-cfg/compact-names.rs @@ -13,4 +13,8 @@ pub fn expected() {} //~^ WARNING unexpected `cfg` condition name pub fn unexpected() {} +#[cfg(target(os = "windows", architecture = "arm"))] +//~^ WARNING unexpected `cfg` condition name +pub fn unexpected2() {} + fn main() {} diff --git a/tests/ui/check-cfg/compact-names.stderr b/tests/ui/check-cfg/compact-names.stderr index 74ed0337e3b..3221b4e07ec 100644 --- a/tests/ui/check-cfg/compact-names.stderr +++ b/tests/ui/check-cfg/compact-names.stderr @@ -8,5 +8,14 @@ LL | #[cfg(target(os = "linux", architecture = "arm"))] = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default -warning: 1 warning emitted +warning: unexpected `cfg` condition name: `target_architecture` + --> $DIR/compact-names.rs:16:30 + | +LL | #[cfg(target(os = "windows", architecture = "arm"))] + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))` + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration + +warning: 2 warnings emitted |
