diff --git a/src/test/ui/const-generics/issues/issue-74713.full.stderr b/src/test/ui/const-generics/issues/issue-74713.full.stderr
new file mode 100644
index 0000000000000..9250f19fa22cf
--- /dev/null
+++ b/src/test/ui/const-generics/issues/issue-74713.full.stderr
@@ -0,0 +1,13 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-74713.rs:9:10
+   |
+LL |       [(); {
+   |  __________^
+LL | |         let _: &'a ();
+LL | |
+LL | |     }]: ,
+   | |_____^ expected `usize`, found `()`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/const-generics/issues/issue-74713.min.stderr b/src/test/ui/const-generics/issues/issue-74713.min.stderr
new file mode 100644
index 0000000000000..5e6b08859efc3
--- /dev/null
+++ b/src/test/ui/const-generics/issues/issue-74713.min.stderr
@@ -0,0 +1,12 @@
+error[E0658]: a non-static lifetime is not allowed in a `const`
+  --> $DIR/issue-74713.rs:10:17
+   |
+LL |         let _: &'a ();
+   |                 ^^
+   |
+   = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
+   = help: add `#![feature(const_generics)]` to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/const-generics/issues/issue-74713.rs b/src/test/ui/const-generics/issues/issue-74713.rs
new file mode 100644
index 0000000000000..123bb6064c91c
--- /dev/null
+++ b/src/test/ui/const-generics/issues/issue-74713.rs
@@ -0,0 +1,16 @@
+// A regression test for #74713.
+
+// revisions: full min
+#![cfg_attr(full, feature(const_generics))]
+#![cfg_attr(full, allow(incomplete_features))]
+
+fn bug<'a>()
+where
+    [(); { //[full]~ ERROR: mismatched types
+        let _: &'a ();
+        //[min]~^ ERROR: a non-static lifetime is not allowed in a `const`
+    }]: ,
+{
+}
+
+fn main() {}