Bug: https://github.com/rust-lang/rust/issues/79010

--- 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 @@
    = note: see issue #64796 <https://github.com/rust-lang/rust/issues/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 @@
    = note: see issue #64796 <https://github.com/rust-lang/rust/issues/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`.
--- 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 @@
 //~^ 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
