From: Debian Rust Maintainers Date: Sat, 28 Aug 2021 09:48:11 +0000 (+0100) Subject: u-update-version-check X-Git-Tag: archive/raspbian/1.49.0+dfsg1-1+rpi1^2~28 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=330de2ded9b8f90f5c96a9886b3c595ddd710a44;p=rustc.git u-update-version-check Bug: https://github.com/rust-lang/rust/issues/79010 Gbp-Pq: Name u-update-version-check.patch --- diff --git a/src/test/ui/feature-gates/feature-gate-cfg-version.rs b/src/test/ui/feature-gates/feature-gate-cfg-version.rs index c29ef99945..4af6acdfad 100644 --- a/src/test/ui/feature-gates/feature-gate-cfg-version.rs +++ b/src/test/ui/feature-gates/feature-gate-cfg-version.rs @@ -27,14 +27,12 @@ fn bar() -> bool { false } //~^ ERROR `cfg(version)` is experimental and subject to change fn bar() -> bool { true } -#[cfg(version("1.65536.2"))] +#[cfg(version("1.65536.2"))] //~ ERROR: invalid version literal //~^ ERROR `cfg(version)` is experimental and subject to change fn version_check_bug() {} fn main() { - // This should fail but due to a bug in version_check `1.65536.2` is interpreted as `1.2`. - // See https://github.com/SergioBenitez/version_check/issues/11 - version_check_bug(); + version_check_bug(); //~ ERROR: cannot find function `version_check_bug` in this scope assert!(foo()); assert!(bar()); assert!(cfg!(version("1.42"))); //~ ERROR `cfg(version)` is experimental and subject to change diff --git a/src/test/ui/feature-gates/feature-gate-cfg-version.stderr b/src/test/ui/feature-gates/feature-gate-cfg-version.stderr index bdf160b5a0..93442facf4 100644 --- a/src/test/ui/feature-gates/feature-gate-cfg-version.stderr +++ b/src/test/ui/feature-gates/feature-gate-cfg-version.stderr @@ -118,8 +118,14 @@ LL | #[cfg(version("1.65536.2"))] = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable +error: invalid version literal + --> $DIR/feature-gate-cfg-version.rs:30:15 + | +LL | #[cfg(version("1.65536.2"))] + | ^^^^^^^^^^^ + error[E0658]: `cfg(version)` is experimental and subject to change - --> $DIR/feature-gate-cfg-version.rs:40:18 + --> $DIR/feature-gate-cfg-version.rs:38:18 | LL | assert!(cfg!(version("1.42"))); | ^^^^^^^^^^^^^^^ @@ -127,6 +133,13 @@ LL | assert!(cfg!(version("1.42"))); = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable -error: aborting due to 16 previous errors +error[E0425]: cannot find function `version_check_bug` in this scope + --> $DIR/feature-gate-cfg-version.rs:35:5 + | +LL | version_check_bug(); + | ^^^^^^^^^^^^^^^^^ not found in this scope + +error: aborting due to 18 previous errors -For more information about this error, try `rustc --explain E0658`. +Some errors have detailed explanations: E0425, E0658. +For more information about an error, try `rustc --explain E0425`.