summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/ui/const-generics/issues
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/const-generics/issues')
-rw-r--r--src/test/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs15
-rw-r--r--src/test/ui/const-generics/issues/auxiliary/impl-const.rs9
-rw-r--r--src/test/ui/const-generics/issues/issue-100313.rs21
-rw-r--r--src/test/ui/const-generics/issues/issue-100313.stderr20
-rw-r--r--src/test/ui/const-generics/issues/issue-56445-1.full.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-56445-1.min.stderr20
-rw-r--r--src/test/ui/const-generics/issues/issue-56445-1.rs13
-rw-r--r--src/test/ui/const-generics/issues/issue-56445-2.rs11
-rw-r--r--src/test/ui/const-generics/issues/issue-56445-2.stderr14
-rw-r--r--src/test/ui/const-generics/issues/issue-56445-3.rs12
-rw-r--r--src/test/ui/const-generics/issues/issue-56445-3.stderr8
-rw-r--r--src/test/ui/const-generics/issues/issue-60818-struct-constructors.rs7
-rw-r--r--src/test/ui/const-generics/issues/issue-61336-1.rs9
-rw-r--r--src/test/ui/const-generics/issues/issue-61336-2.rs13
-rw-r--r--src/test/ui/const-generics/issues/issue-61336-2.stderr15
-rw-r--r--src/test/ui/const-generics/issues/issue-61336.rs13
-rw-r--r--src/test/ui/const-generics/issues/issue-61336.stderr15
-rw-r--r--src/test/ui/const-generics/issues/issue-61422.rs24
-rw-r--r--src/test/ui/const-generics/issues/issue-61432.rs9
-rw-r--r--src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs12
-rw-r--r--src/test/ui/const-generics/issues/issue-62878.full.stderr9
-rw-r--r--src/test/ui/const-generics/issues/issue-62878.min.stderr18
-rw-r--r--src/test/ui/const-generics/issues/issue-62878.rs11
-rw-r--r--src/test/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr9
-rw-r--r--src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs17
-rw-r--r--src/test/ui/const-generics/issues/issue-64519.rs17
-rw-r--r--src/test/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs16
-rw-r--r--src/test/ui/const-generics/issues/issue-66906.rs9
-rw-r--r--src/test/ui/const-generics/issues/issue-67185-1.rs29
-rw-r--r--src/test/ui/const-generics/issues/issue-67185-2.rs31
-rw-r--r--src/test/ui/const-generics/issues/issue-67185-2.stderr99
-rw-r--r--src/test/ui/const-generics/issues/issue-67375.full.stderr12
-rw-r--r--src/test/ui/const-generics/issues/issue-67375.min.stderr21
-rw-r--r--src/test/ui/const-generics/issues/issue-67375.rs12
-rw-r--r--src/test/ui/const-generics/issues/issue-67739.full.stderr10
-rw-r--r--src/test/ui/const-generics/issues/issue-67739.min.stderr10
-rw-r--r--src/test/ui/const-generics/issues/issue-67739.rs18
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-1.full.stderr17
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-1.min.stderr30
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-1.rs19
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-2.full.stderr17
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-2.min.stderr8
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-2.rs16
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-3.full.stderr16
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-3.min.stderr21
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-3.rs17
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-4.full.stderr16
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-4.min.stderr21
-rw-r--r--src/test/ui/const-generics/issues/issue-67945-4.rs16
-rw-r--r--src/test/ui/const-generics/issues/issue-68104-print-stack-overflow.rs13
-rw-r--r--src/test/ui/const-generics/issues/issue-68366.full.stderr21
-rw-r--r--src/test/ui/const-generics/issues/issue-68366.min.stderr30
-rw-r--r--src/test/ui/const-generics/issues/issue-68366.rs20
-rw-r--r--src/test/ui/const-generics/issues/issue-68596.rs15
-rw-r--r--src/test/ui/const-generics/issues/issue-68615-adt.min.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-68615-adt.rs13
-rw-r--r--src/test/ui/const-generics/issues/issue-68615-array.min.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-68615-array.rs13
-rw-r--r--src/test/ui/const-generics/issues/issue-69654-run-pass.rs15
-rw-r--r--src/test/ui/const-generics/issues/issue-70125-1.rs17
-rw-r--r--src/test/ui/const-generics/issues/issue-70125-2.rs12
-rw-r--r--src/test/ui/const-generics/issues/issue-70167.rs6
-rw-r--r--src/test/ui/const-generics/issues/issue-70180-1-stalled_on.rs33
-rw-r--r--src/test/ui/const-generics/issues/issue-70180-2-stalled_on.rs33
-rw-r--r--src/test/ui/const-generics/issues/issue-70225.rs19
-rw-r--r--src/test/ui/const-generics/issues/issue-70273-assoc-fn.rs14
-rw-r--r--src/test/ui/const-generics/issues/issue-71169.full.stderr9
-rw-r--r--src/test/ui/const-generics/issues/issue-71169.min.stderr18
-rw-r--r--src/test/ui/const-generics/issues/issue-71169.rs11
-rw-r--r--src/test/ui/const-generics/issues/issue-71202.rs31
-rw-r--r--src/test/ui/const-generics/issues/issue-71202.stderr33
-rw-r--r--src/test/ui/const-generics/issues/issue-71381.full.stderr28
-rw-r--r--src/test/ui/const-generics/issues/issue-71381.min.stderr27
-rw-r--r--src/test/ui/const-generics/issues/issue-71381.rs36
-rw-r--r--src/test/ui/const-generics/issues/issue-71382.full.stderr9
-rw-r--r--src/test/ui/const-generics/issues/issue-71382.min.stderr8
-rw-r--r--src/test/ui/const-generics/issues/issue-71382.rs25
-rw-r--r--src/test/ui/const-generics/issues/issue-71547.rs18
-rw-r--r--src/test/ui/const-generics/issues/issue-71611.full.stderr16
-rw-r--r--src/test/ui/const-generics/issues/issue-71611.min.stderr15
-rw-r--r--src/test/ui/const-generics/issues/issue-71611.rs11
-rw-r--r--src/test/ui/const-generics/issues/issue-71986.rs6
-rw-r--r--src/test/ui/const-generics/issues/issue-72352.full.stderr9
-rw-r--r--src/test/ui/const-generics/issues/issue-72352.min.stderr8
-rw-r--r--src/test/ui/const-generics/issues/issue-72352.rs22
-rw-r--r--src/test/ui/const-generics/issues/issue-72845.rs49
-rw-r--r--src/test/ui/const-generics/issues/issue-72845.stderr12
-rw-r--r--src/test/ui/const-generics/issues/issue-73120.rs10
-rw-r--r--src/test/ui/const-generics/issues/issue-73260.rs19
-rw-r--r--src/test/ui/const-generics/issues/issue-73260.stderr37
-rw-r--r--src/test/ui/const-generics/issues/issue-73491.min.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-73491.rs11
-rw-r--r--src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs14
-rw-r--r--src/test/ui/const-generics/issues/issue-74101.min.stderr20
-rw-r--r--src/test/ui/const-generics/issues/issue-74101.rs12
-rw-r--r--src/test/ui/const-generics/issues/issue-74255.min.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-74255.rs20
-rw-r--r--src/test/ui/const-generics/issues/issue-74906.rs22
-rw-r--r--src/test/ui/const-generics/issues/issue-74950.min.stderr47
-rw-r--r--src/test/ui/const-generics/issues/issue-74950.rs24
-rw-r--r--src/test/ui/const-generics/issues/issue-75047.min.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-75047.rs17
-rw-r--r--src/test/ui/const-generics/issues/issue-75299.rs8
-rw-r--r--src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.rs11
-rw-r--r--src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr20
-rw-r--r--src/test/ui/const-generics/issues/issue-77357.rs11
-rw-r--r--src/test/ui/const-generics/issues/issue-77357.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-79674.rs28
-rw-r--r--src/test/ui/const-generics/issues/issue-79674.stderr20
-rw-r--r--src/test/ui/const-generics/issues/issue-80062.rs10
-rw-r--r--src/test/ui/const-generics/issues/issue-80062.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-80375.rs4
-rw-r--r--src/test/ui/const-generics/issues/issue-80375.stderr11
-rw-r--r--src/test/ui/const-generics/issues/issue-82956.rs33
-rw-r--r--src/test/ui/const-generics/issues/issue-82956.stderr21
-rw-r--r--src/test/ui/const-generics/issues/issue-83249.rs23
-rw-r--r--src/test/ui/const-generics/issues/issue-83249.stderr14
-rw-r--r--src/test/ui/const-generics/issues/issue-83288.rs69
-rw-r--r--src/test/ui/const-generics/issues/issue-83466.rs17
-rw-r--r--src/test/ui/const-generics/issues/issue-83466.stderr22
-rw-r--r--src/test/ui/const-generics/issues/issue-83765.rs116
-rw-r--r--src/test/ui/const-generics/issues/issue-83765.stderr21
-rw-r--r--src/test/ui/const-generics/issues/issue-83993.rs14
-rw-r--r--src/test/ui/const-generics/issues/issue-84659.rs12
-rw-r--r--src/test/ui/const-generics/issues/issue-84659.stderr10
-rw-r--r--src/test/ui/const-generics/issues/issue-85031-2.rs18
-rw-r--r--src/test/ui/const-generics/issues/issue-85031-2.stderr14
-rw-r--r--src/test/ui/const-generics/issues/issue-86033.rs20
-rw-r--r--src/test/ui/const-generics/issues/issue-86530.rs20
-rw-r--r--src/test/ui/const-generics/issues/issue-86530.stderr20
-rw-r--r--src/test/ui/const-generics/issues/issue-86535-2.rs19
-rw-r--r--src/test/ui/const-generics/issues/issue-86535.rs20
-rw-r--r--src/test/ui/const-generics/issues/issue-86820.rs24
-rw-r--r--src/test/ui/const-generics/issues/issue-86820.stderr16
-rw-r--r--src/test/ui/const-generics/issues/issue-87076.rs20
-rw-r--r--src/test/ui/const-generics/issues/issue-87470.rs24
-rw-r--r--src/test/ui/const-generics/issues/issue-87493.rs14
-rw-r--r--src/test/ui/const-generics/issues/issue-87493.stderr30
-rw-r--r--src/test/ui/const-generics/issues/issue-87964.rs29
-rw-r--r--src/test/ui/const-generics/issues/issue-88119.rs36
-rw-r--r--src/test/ui/const-generics/issues/issue-88468.rs13
-rw-r--r--src/test/ui/const-generics/issues/issue-88997.rs14
-rw-r--r--src/test/ui/const-generics/issues/issue-88997.stderr15
-rw-r--r--src/test/ui/const-generics/issues/issue-89146.rs26
-rw-r--r--src/test/ui/const-generics/issues/issue-89304.rs20
-rw-r--r--src/test/ui/const-generics/issues/issue-89320.rs19
-rw-r--r--src/test/ui/const-generics/issues/issue-89334.rs16
-rw-r--r--src/test/ui/const-generics/issues/issue-90318.rs30
-rw-r--r--src/test/ui/const-generics/issues/issue-90318.stderr29
-rw-r--r--src/test/ui/const-generics/issues/issue-90364.rs9
-rw-r--r--src/test/ui/const-generics/issues/issue-90364.stderr9
-rw-r--r--src/test/ui/const-generics/issues/issue-90455.rs12
-rw-r--r--src/test/ui/const-generics/issues/issue-90455.stderr10
-rw-r--r--src/test/ui/const-generics/issues/issue-92186.rs12
-rw-r--r--src/test/ui/const-generics/issues/issue-96654.rs15
-rw-r--r--src/test/ui/const-generics/issues/issue-97278.rs14
-rw-r--r--src/test/ui/const-generics/issues/issue-97278.stderr9
-rw-r--r--src/test/ui/const-generics/issues/issue-97634.rs10
-rw-r--r--src/test/ui/const-generics/issues/issue-98629.rs16
-rw-r--r--src/test/ui/const-generics/issues/issue-98629.stderr12
-rw-r--r--src/test/ui/const-generics/issues/issue-99641.rs18
-rw-r--r--src/test/ui/const-generics/issues/issue-99641.stderr15
164 files changed, 0 insertions, 3022 deletions
diff --git a/src/test/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs b/src/test/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs
deleted file mode 100644
index 6a10ee267..000000000
--- a/src/test/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-// All of these three items must be in `lib2` to reproduce the error
-
-pub trait TypeFn {
- type Output;
-}
-
-pub struct GenericType<const B: i8>;
-
-// Removing the braces around `42` resolves the crash
-impl TypeFn for GenericType<{ 40 + 2 }> {
- type Output = ();
-}
diff --git a/src/test/ui/const-generics/issues/auxiliary/impl-const.rs b/src/test/ui/const-generics/issues/auxiliary/impl-const.rs
deleted file mode 100644
index de3a40860..000000000
--- a/src/test/ui/const-generics/issues/auxiliary/impl-const.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(generic_const_exprs)]
-
-pub struct Num<const N: usize>;
-
-// Braces around const expression causes crash
-impl Num<{5}> {
- pub fn five(&self) {
- }
-}
diff --git a/src/test/ui/const-generics/issues/issue-100313.rs b/src/test/ui/const-generics/issues/issue-100313.rs
deleted file mode 100644
index 4e9d3626a..000000000
--- a/src/test/ui/const-generics/issues/issue-100313.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(const_mut_refs)]
-#![feature(adt_const_params)]
-
-struct T<const B: &'static bool>;
-
-impl <const B: &'static bool> T<B> {
- const fn set_false(&self) {
- unsafe {
- *(B as *const bool as *mut bool) = false;
- //~^ ERROR evaluation of constant value failed [E0080]
- }
- }
-}
-
-const _: () = {
- let x = T::<{&true}>;
- x.set_false();
-};
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-100313.stderr b/src/test/ui/const-generics/issues/issue-100313.stderr
deleted file mode 100644
index d4b486376..000000000
--- a/src/test/ui/const-generics/issues/issue-100313.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0080]: evaluation of constant value failed
- --> $DIR/issue-100313.rs:10:13
- |
-LL | *(B as *const bool as *mut bool) = false;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to alloc7 which is read-only
- |
-note: inside `T::<&true>::set_false`
- --> $DIR/issue-100313.rs:10:13
- |
-LL | *(B as *const bool as *mut bool) = false;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: inside `_`
- --> $DIR/issue-100313.rs:18:5
- |
-LL | x.set_false();
- | ^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/ui/const-generics/issues/issue-56445-1.full.stderr b/src/test/ui/const-generics/issues/issue-56445-1.full.stderr
deleted file mode 100644
index 179643a75..000000000
--- a/src/test/ui/const-generics/issues/issue-56445-1.full.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0771]: use of non-static lifetime `'a` in const generic
- --> $DIR/issue-56445-1.rs:9:26
- |
-LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
- | ^^
- |
- = note: for more information, see issue #74052 <https://github.com/rust-lang/rust/issues/74052>
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0771`.
diff --git a/src/test/ui/const-generics/issues/issue-56445-1.min.stderr b/src/test/ui/const-generics/issues/issue-56445-1.min.stderr
deleted file mode 100644
index 43a5df117..000000000
--- a/src/test/ui/const-generics/issues/issue-56445-1.min.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0771]: use of non-static lifetime `'a` in const generic
- --> $DIR/issue-56445-1.rs:9:26
- |
-LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
- | ^^
- |
- = note: for more information, see issue #74052 <https://github.com/rust-lang/rust/issues/74052>
-
-error: `&'static str` is forbidden as the type of a const generic parameter
- --> $DIR/issue-56445-1.rs:9:25
- |
-LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
- | ^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0771`.
diff --git a/src/test/ui/const-generics/issues/issue-56445-1.rs b/src/test/ui/const-generics/issues/issue-56445-1.rs
deleted file mode 100644
index 13eb2ea9f..000000000
--- a/src/test/ui/const-generics/issues/issue-56445-1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995.
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-#![crate_type = "lib"]
-
-use std::marker::PhantomData;
-
-struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
-//~^ ERROR: use of non-static lifetime `'a` in const generic
-//[min]~| ERROR: `&'static str` is forbidden as the type of a const generic parameter
-
-impl Bug<'_, ""> {}
diff --git a/src/test/ui/const-generics/issues/issue-56445-2.rs b/src/test/ui/const-generics/issues/issue-56445-2.rs
deleted file mode 100644
index e078c8487..000000000
--- a/src/test/ui/const-generics/issues/issue-56445-2.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-502095133
-struct OnDiskDirEntry<'a> { _s: &'a usize }
-
-impl<'a> OnDiskDirEntry<'a> {
- const LFN_FRAGMENT_LEN: usize = 2;
-
- fn lfn_contents(&self) -> [char; Self::LFN_FRAGMENT_LEN] { loop { } }
- //~^ ERROR: generic `Self` types are currently not permitted in anonymous constants
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-56445-2.stderr b/src/test/ui/const-generics/issues/issue-56445-2.stderr
deleted file mode 100644
index 770c80cbb..000000000
--- a/src/test/ui/const-generics/issues/issue-56445-2.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: generic `Self` types are currently not permitted in anonymous constants
- --> $DIR/issue-56445-2.rs:7:38
- |
-LL | fn lfn_contents(&self) -> [char; Self::LFN_FRAGMENT_LEN] { loop { } }
- | ^^^^
- |
-note: not a concrete type
- --> $DIR/issue-56445-2.rs:4:10
- |
-LL | impl<'a> OnDiskDirEntry<'a> {
- | ^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-56445-3.rs b/src/test/ui/const-generics/issues/issue-56445-3.rs
deleted file mode 100644
index c29df1458..000000000
--- a/src/test/ui/const-generics/issues/issue-56445-3.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-524494170
-pub struct Memory<'rom> {
- rom: &'rom [u8],
- ram: [u8; Self::SIZE],
- //~^ ERROR: generic `Self` types are currently not permitted in anonymous constants
-}
-
-impl<'rom> Memory<'rom> {
- pub const SIZE: usize = 0x8000;
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-56445-3.stderr b/src/test/ui/const-generics/issues/issue-56445-3.stderr
deleted file mode 100644
index f1c49eecf..000000000
--- a/src/test/ui/const-generics/issues/issue-56445-3.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: generic `Self` types are currently not permitted in anonymous constants
- --> $DIR/issue-56445-3.rs:4:15
- |
-LL | ram: [u8; Self::SIZE],
- | ^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-60818-struct-constructors.rs b/src/test/ui/const-generics/issues/issue-60818-struct-constructors.rs
deleted file mode 100644
index 0066490df..000000000
--- a/src/test/ui/const-generics/issues/issue-60818-struct-constructors.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// check-pass
-
-struct Generic<const V: usize>;
-
-fn main() {
- let _ = Generic::<0>;
-}
diff --git a/src/test/ui/const-generics/issues/issue-61336-1.rs b/src/test/ui/const-generics/issues/issue-61336-1.rs
deleted file mode 100644
index beb37e63b..000000000
--- a/src/test/ui/const-generics/issues/issue-61336-1.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// build-pass
-fn f<T: Copy, const N: usize>(x: T) -> [T; N] {
- [x; N]
-}
-
-fn main() {
- let x: [u32; 5] = f::<u32, 5>(3);
- assert_eq!(x, [3u32; 5]);
-}
diff --git a/src/test/ui/const-generics/issues/issue-61336-2.rs b/src/test/ui/const-generics/issues/issue-61336-2.rs
deleted file mode 100644
index b7cd29f89..000000000
--- a/src/test/ui/const-generics/issues/issue-61336-2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-fn f<T: Copy, const N: usize>(x: T) -> [T; N] {
- [x; { N }]
-}
-
-fn g<T, const N: usize>(x: T) -> [T; N] {
- [x; { N }]
- //~^ ERROR the trait bound `T: Copy` is not satisfied
-}
-
-fn main() {
- let x: [u32; 5] = f::<u32, 5>(3);
- assert_eq!(x, [3u32; 5]);
-}
diff --git a/src/test/ui/const-generics/issues/issue-61336-2.stderr b/src/test/ui/const-generics/issues/issue-61336-2.stderr
deleted file mode 100644
index 5bb356696..000000000
--- a/src/test/ui/const-generics/issues/issue-61336-2.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0277]: the trait bound `T: Copy` is not satisfied
- --> $DIR/issue-61336-2.rs:6:6
- |
-LL | [x; { N }]
- | ^ the trait `Copy` is not implemented for `T`
- |
- = note: the `Copy` trait is required because this value will be copied for each element of the array
-help: consider restricting type parameter `T`
- |
-LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
- | +++++++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/issues/issue-61336.rs b/src/test/ui/const-generics/issues/issue-61336.rs
deleted file mode 100644
index 80be1d8e5..000000000
--- a/src/test/ui/const-generics/issues/issue-61336.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-fn f<T: Copy, const N: usize>(x: T) -> [T; N] {
- [x; N]
-}
-
-fn g<T, const N: usize>(x: T) -> [T; N] {
- [x; N]
- //~^ ERROR the trait bound `T: Copy` is not satisfied
-}
-
-fn main() {
- let x: [u32; 5] = f::<u32, 5>(3);
- assert_eq!(x, [3u32; 5]);
-}
diff --git a/src/test/ui/const-generics/issues/issue-61336.stderr b/src/test/ui/const-generics/issues/issue-61336.stderr
deleted file mode 100644
index 8d9e545b4..000000000
--- a/src/test/ui/const-generics/issues/issue-61336.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0277]: the trait bound `T: Copy` is not satisfied
- --> $DIR/issue-61336.rs:6:6
- |
-LL | [x; N]
- | ^ the trait `Copy` is not implemented for `T`
- |
- = note: the `Copy` trait is required because this value will be copied for each element of the array
-help: consider restricting type parameter `T`
- |
-LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
- | +++++++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/issues/issue-61422.rs b/src/test/ui/const-generics/issues/issue-61422.rs
deleted file mode 100644
index 0b9cf40d8..000000000
--- a/src/test/ui/const-generics/issues/issue-61422.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// check-pass
-use std::mem;
-
-// Neither of the uninits below are currently accepted as not UB, however,
-// this code does not run and is merely checking that we do not ICE on this pattern,
-// so this is fine.
-
-fn foo<const SIZE: usize>() {
- let arr: [u8; SIZE] = unsafe {
- #[allow(deprecated)]
- let array: [u8; SIZE] = mem::uninitialized();
- array
- };
-}
-
-fn bar<const SIZE: usize>() {
- let arr: [u8; SIZE] = unsafe {
- let array: [u8; SIZE] = mem::MaybeUninit::uninit().assume_init();
- array
- };
-}
-
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-61432.rs b/src/test/ui/const-generics/issues/issue-61432.rs
deleted file mode 100644
index 6192af82a..000000000
--- a/src/test/ui/const-generics/issues/issue-61432.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-pass
-
-fn promote<const N: i32>() {
- let _ = &N;
-}
-
-fn main() {
- promote::<0>();
-}
diff --git a/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs b/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs
deleted file mode 100644
index fa76aeae9..000000000
--- a/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// run-pass
-pub trait BitLen: Sized {
- const BIT_LEN: usize;
-}
-
-impl<const L: usize> BitLen for [u8; L] {
- const BIT_LEN: usize = 8 * L;
-}
-
-fn main() {
- let _foo = <[u8; 2]>::BIT_LEN;
-}
diff --git a/src/test/ui/const-generics/issues/issue-62878.full.stderr b/src/test/ui/const-generics/issues/issue-62878.full.stderr
deleted file mode 100644
index 3a2b291d7..000000000
--- a/src/test/ui/const-generics/issues/issue-62878.full.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-62878.rs:5:38
- |
-LL | fn foo<const N: usize, const A: [u8; N]>() {}
- | ^ the type must not depend on the parameter `N`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0770`.
diff --git a/src/test/ui/const-generics/issues/issue-62878.min.stderr b/src/test/ui/const-generics/issues/issue-62878.min.stderr
deleted file mode 100644
index af029a651..000000000
--- a/src/test/ui/const-generics/issues/issue-62878.min.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-62878.rs:5:38
- |
-LL | fn foo<const N: usize, const A: [u8; N]>() {}
- | ^ the type must not depend on the parameter `N`
-
-error: `[u8; _]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-62878.rs:5:33
- |
-LL | fn foo<const N: usize, const A: [u8; N]>() {}
- | ^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0770`.
diff --git a/src/test/ui/const-generics/issues/issue-62878.rs b/src/test/ui/const-generics/issues/issue-62878.rs
deleted file mode 100644
index 578ce765b..000000000
--- a/src/test/ui/const-generics/issues/issue-62878.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params, generic_arg_infer))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-fn foo<const N: usize, const A: [u8; N]>() {}
-//~^ ERROR the type of const parameters must not
-//[min]~| ERROR `[u8; _]` is forbidden as the type of a const generic parameter
-
-fn main() {
- foo::<_, { [1] }>();
-}
diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr
deleted file mode 100644
index 16fabd1e8..000000000
--- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0741]: `(dyn A + 'static)` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter
- --> $DIR/issue-63322-forbid-dyn.rs:9:18
- |
-LL | fn test<const T: &'static dyn A>() {
- | ^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0741`.
diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr
deleted file mode 100644
index 9f6c7ccf3..000000000
--- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: `&'static (dyn A + 'static)` is forbidden as the type of a const generic parameter
- --> $DIR/issue-63322-forbid-dyn.rs:9:18
- |
-LL | fn test<const T: &'static dyn A>() {
- | ^^^^^^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
deleted file mode 100644
index 116c3fcfb..000000000
--- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-trait A {}
-struct B;
-impl A for B {}
-
-fn test<const T: &'static dyn A>() {
- //[full]~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
- //[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden
- unimplemented!()
-}
-
-fn main() {
- test::<{ &B }>();
-}
diff --git a/src/test/ui/const-generics/issues/issue-64519.rs b/src/test/ui/const-generics/issues/issue-64519.rs
deleted file mode 100644
index 969289b26..000000000
--- a/src/test/ui/const-generics/issues/issue-64519.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// check-pass
-struct Foo<const D: usize> {
- state: Option<[u8; D]>,
-}
-
-impl<const D: usize> Iterator for Foo<{D}> {
- type Item = [u8; D];
- fn next(&mut self) -> Option<Self::Item> {
- if true {
- return Some(self.state.unwrap().clone());
- } else {
- return Some(self.state.unwrap().clone());
- }
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs b/src/test/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs
deleted file mode 100644
index 091419f0c..000000000
--- a/src/test/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// check-pass
-#![feature(adt_const_params)]
-#![allow(incomplete_features)]
-
-
-trait Trait<const NAME: &'static str> {
- type Assoc;
-}
-
-impl Trait<"0"> for () {
- type Assoc = ();
-}
-
-fn main() {
- let _: <() as Trait<"0">>::Assoc = ();
-}
diff --git a/src/test/ui/const-generics/issues/issue-66906.rs b/src/test/ui/const-generics/issues/issue-66906.rs
deleted file mode 100644
index a0b3f9122..000000000
--- a/src/test/ui/const-generics/issues/issue-66906.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// check-pass
-
-pub struct Tuple;
-
-pub trait Trait<const I: usize> {
- type Input: From<<Self as Trait<I>>::Input>;
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-67185-1.rs b/src/test/ui/const-generics/issues/issue-67185-1.rs
deleted file mode 100644
index 69425b25e..000000000
--- a/src/test/ui/const-generics/issues/issue-67185-1.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// check-pass
-
-trait Baz {
- type Quaks;
-}
-impl Baz for u8 {
- type Quaks = [u16; 3];
-}
-
-trait Bar {}
-impl Bar for [u16; 3] {}
-impl Bar for [[u16; 3]; 2] {}
-
-trait Foo
- where
- [<u8 as Baz>::Quaks; 2]: Bar,
- <u8 as Baz>::Quaks: Bar,
-{
-}
-
-struct FooImpl;
-
-impl Foo for FooImpl {}
-
-fn f(_: impl Foo) {}
-
-fn main() {
- f(FooImpl)
-}
diff --git a/src/test/ui/const-generics/issues/issue-67185-2.rs b/src/test/ui/const-generics/issues/issue-67185-2.rs
deleted file mode 100644
index 18bb6f6bc..000000000
--- a/src/test/ui/const-generics/issues/issue-67185-2.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-trait Baz {
- type Quaks;
-}
-impl Baz for u8 {
- type Quaks = [u16; 3];
-}
-
-trait Bar {}
-impl Bar for [u16; 4] {}
-impl Bar for [[u16; 3]; 3] {}
-
-trait Foo
-where
- [<u8 as Baz>::Quaks; 2]: Bar, //~ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]
- <u8 as Baz>::Quaks: Bar, //~ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]
-{
-}
-
-struct FooImpl;
-
-impl Foo for FooImpl {}
-//~^ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]
-//~^^ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]
-
-fn f(_: impl Foo) {}
-//~^ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]
-//~^^ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]
-
-fn main() {
- f(FooImpl)
-}
diff --git a/src/test/ui/const-generics/issues/issue-67185-2.stderr b/src/test/ui/const-generics/issues/issue-67185-2.stderr
deleted file mode 100644
index c7be8e14a..000000000
--- a/src/test/ui/const-generics/issues/issue-67185-2.stderr
+++ /dev/null
@@ -1,99 +0,0 @@
-error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
- --> $DIR/issue-67185-2.rs:15:5
- |
-LL | <u8 as Baz>::Quaks: Bar,
- | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[u16; 3]`
- |
- = help: the following other types implement trait `Bar`:
- [[u16; 3]; 3]
- [u16; 4]
- = help: see issue #48214
- = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
-
-error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
- --> $DIR/issue-67185-2.rs:14:5
- |
-LL | [<u8 as Baz>::Quaks; 2]: Bar,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
- |
- = help: the following other types implement trait `Bar`:
- [[u16; 3]; 3]
- [u16; 4]
- = help: see issue #48214
- = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
-
-error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
- --> $DIR/issue-67185-2.rs:21:6
- |
-LL | impl Foo for FooImpl {}
- | ^^^ the trait `Bar` is not implemented for `[u16; 3]`
- |
- = help: the following other types implement trait `Bar`:
- [[u16; 3]; 3]
- [u16; 4]
-note: required by a bound in `Foo`
- --> $DIR/issue-67185-2.rs:15:25
- |
-LL | trait Foo
- | --- required by a bound in this
-...
-LL | <u8 as Baz>::Quaks: Bar,
- | ^^^ required by this bound in `Foo`
-
-error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
- --> $DIR/issue-67185-2.rs:21:6
- |
-LL | impl Foo for FooImpl {}
- | ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
- |
- = help: the following other types implement trait `Bar`:
- [[u16; 3]; 3]
- [u16; 4]
-note: required by a bound in `Foo`
- --> $DIR/issue-67185-2.rs:14:30
- |
-LL | trait Foo
- | --- required by a bound in this
-LL | where
-LL | [<u8 as Baz>::Quaks; 2]: Bar,
- | ^^^ required by this bound in `Foo`
-
-error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
- --> $DIR/issue-67185-2.rs:25:14
- |
-LL | fn f(_: impl Foo) {}
- | ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
- |
- = help: the following other types implement trait `Bar`:
- [[u16; 3]; 3]
- [u16; 4]
-note: required by a bound in `Foo`
- --> $DIR/issue-67185-2.rs:14:30
- |
-LL | trait Foo
- | --- required by a bound in this
-LL | where
-LL | [<u8 as Baz>::Quaks; 2]: Bar,
- | ^^^ required by this bound in `Foo`
-
-error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
- --> $DIR/issue-67185-2.rs:25:14
- |
-LL | fn f(_: impl Foo) {}
- | ^^^ the trait `Bar` is not implemented for `[u16; 3]`
- |
- = help: the following other types implement trait `Bar`:
- [[u16; 3]; 3]
- [u16; 4]
-note: required by a bound in `Foo`
- --> $DIR/issue-67185-2.rs:15:25
- |
-LL | trait Foo
- | --- required by a bound in this
-...
-LL | <u8 as Baz>::Quaks: Bar,
- | ^^^ required by this bound in `Foo`
-
-error: aborting due to 6 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/issues/issue-67375.full.stderr b/src/test/ui/const-generics/issues/issue-67375.full.stderr
deleted file mode 100644
index 0cf69879a..000000000
--- a/src/test/ui/const-generics/issues/issue-67375.full.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error: overly complex generic constant
- --> $DIR/issue-67375.rs:7:17
- |
-LL | inner: [(); { [|_: &T| {}; 0].len() }],
- | ^^---------------------^^
- | |
- | pointer casts are not allowed in generic constants
- |
- = help: consider moving this anonymous constant into a `const` function
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-67375.min.stderr b/src/test/ui/const-generics/issues/issue-67375.min.stderr
deleted file mode 100644
index 5256d96c8..000000000
--- a/src/test/ui/const-generics/issues/issue-67375.min.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error: generic parameters may not be used in const operations
- --> $DIR/issue-67375.rs:7:25
- |
-LL | inner: [(); { [|_: &T| {}; 0].len() }],
- | ^ cannot perform const operation using `T`
- |
- = note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error[E0392]: parameter `T` is never used
- --> $DIR/issue-67375.rs:5:12
- |
-LL | struct Bug<T> {
- | ^ unused parameter
- |
- = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
- = help: if you intended `T` to be a const parameter, use `const T: usize` instead
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0392`.
diff --git a/src/test/ui/const-generics/issues/issue-67375.rs b/src/test/ui/const-generics/issues/issue-67375.rs
deleted file mode 100644
index 8b4b276ba..000000000
--- a/src/test/ui/const-generics/issues/issue-67375.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, allow(incomplete_features))]
-#![cfg_attr(full, feature(generic_const_exprs))]
-
-struct Bug<T> {
- //[min]~^ ERROR parameter `T` is never used
- inner: [(); { [|_: &T| {}; 0].len() }],
- //[min]~^ ERROR generic parameters may not be used in const operations
- //[full]~^^ ERROR overly complex generic constant
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-67739.full.stderr b/src/test/ui/const-generics/issues/issue-67739.full.stderr
deleted file mode 100644
index f1a426c3c..000000000
--- a/src/test/ui/const-generics/issues/issue-67739.full.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: unconstrained generic constant
- --> $DIR/issue-67739.rs:11:15
- |
-LL | [0u8; mem::size_of::<Self::Associated>()];
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: try adding a `where` bound using this expression: `where [(); mem::size_of::<Self::Associated>()]:`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-67739.min.stderr b/src/test/ui/const-generics/issues/issue-67739.min.stderr
deleted file mode 100644
index dcbe5b94a..000000000
--- a/src/test/ui/const-generics/issues/issue-67739.min.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: constant expression depends on a generic parameter
- --> $DIR/issue-67739.rs:11:15
- |
-LL | [0u8; mem::size_of::<Self::Associated>()];
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: this may fail depending on what value the parameter takes
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-67739.rs b/src/test/ui/const-generics/issues/issue-67739.rs
deleted file mode 100644
index de0eb7f50..000000000
--- a/src/test/ui/const-generics/issues/issue-67739.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, feature(generic_const_exprs))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-use std::mem;
-
-pub trait Trait {
- type Associated: Sized;
-
- fn associated_size(&self) -> usize {
- [0u8; mem::size_of::<Self::Associated>()];
- //[min]~^ ERROR constant expression depends on a generic parameter
- //[full]~^^ ERROR unconstrained generic constant
- 0
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-67945-1.full.stderr b/src/test/ui/const-generics/issues/issue-67945-1.full.stderr
deleted file mode 100644
index 8e18fcdff..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-1.full.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-67945-1.rs:10:20
- |
-LL | struct Bug<S> {
- | - this type parameter
-...
-LL | let x: S = MaybeUninit::uninit();
- | - ^^^^^^^^^^^^^^^^^^^^^ expected type parameter `S`, found union `MaybeUninit`
- | |
- | expected due to this
- |
- = note: expected type parameter `S`
- found union `MaybeUninit<_>`
-
-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-67945-1.min.stderr b/src/test/ui/const-generics/issues/issue-67945-1.min.stderr
deleted file mode 100644
index eee04eb75..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-1.min.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error: generic parameters may not be used in const operations
- --> $DIR/issue-67945-1.rs:10:16
- |
-LL | let x: S = MaybeUninit::uninit();
- | ^ cannot perform const operation using `S`
- |
- = note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error: generic parameters may not be used in const operations
- --> $DIR/issue-67945-1.rs:13:45
- |
-LL | let b = &*(&x as *const _ as *const S);
- | ^ cannot perform const operation using `S`
- |
- = note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error[E0392]: parameter `S` is never used
- --> $DIR/issue-67945-1.rs:7:12
- |
-LL | struct Bug<S> {
- | ^ unused parameter
- |
- = help: consider removing `S`, referring to it in a field, or using a marker such as `PhantomData`
- = help: if you intended `S` to be a const parameter, use `const S: usize` instead
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0392`.
diff --git a/src/test/ui/const-generics/issues/issue-67945-1.rs b/src/test/ui/const-generics/issues/issue-67945-1.rs
deleted file mode 100644
index 99f88bc8e..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-1.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, allow(incomplete_features))]
-#![cfg_attr(full, feature(generic_const_exprs))]
-
-use std::mem::MaybeUninit;
-
-struct Bug<S> {
- //[min]~^ ERROR parameter `S` is never used
- A: [(); {
- let x: S = MaybeUninit::uninit();
- //[min]~^ ERROR generic parameters may not be used in const operations
- //[full]~^^ ERROR mismatched types
- let b = &*(&x as *const _ as *const S);
- //[min]~^ ERROR generic parameters may not be used in const operations
- 0
- }],
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-67945-2.full.stderr b/src/test/ui/const-generics/issues/issue-67945-2.full.stderr
deleted file mode 100644
index cce85772a..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-2.full.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error: overly complex generic constant
- --> $DIR/issue-67945-2.rs:7:13
- |
-LL | A: [(); {
- | _____________^
-LL | |
-LL | | let x: Option<Box<Self>> = None;
-LL | |
-LL | | 0
-LL | | }],
- | |_____^ blocks are not supported in generic constant
- |
- = help: consider moving this anonymous constant into a `const` function
- = note: this operation may be supported in the future
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-67945-2.min.stderr b/src/test/ui/const-generics/issues/issue-67945-2.min.stderr
deleted file mode 100644
index 6e07af1e6..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-2.min.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: generic `Self` types are currently not permitted in anonymous constants
- --> $DIR/issue-67945-2.rs:9:27
- |
-LL | let x: Option<Box<Self>> = None;
- | ^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-67945-2.rs b/src/test/ui/const-generics/issues/issue-67945-2.rs
deleted file mode 100644
index cbb4e14ec..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// revisions: full min
-
-#![cfg_attr(full, allow(incomplete_features))]
-#![cfg_attr(full, feature(generic_const_exprs))]
-
-struct Bug<S: ?Sized> {
- A: [(); {
- //[full]~^ ERROR overly complex generic constant
- let x: Option<Box<Self>> = None;
- //[min]~^ ERROR generic `Self` types are currently not permitted in anonymous constants
- 0
- }],
- B: S
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-67945-3.full.stderr b/src/test/ui/const-generics/issues/issue-67945-3.full.stderr
deleted file mode 100644
index d3d9452d3..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-3.full.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error: overly complex generic constant
- --> $DIR/issue-67945-3.rs:10:13
- |
-LL | A: [(); {
- | _____________^
-LL | | let x: Option<S> = None;
-LL | |
-LL | | 0
-LL | | }],
- | |_____^ blocks are not supported in generic constant
- |
- = help: consider moving this anonymous constant into a `const` function
- = note: this operation may be supported in the future
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-67945-3.min.stderr b/src/test/ui/const-generics/issues/issue-67945-3.min.stderr
deleted file mode 100644
index 8e6b4b204..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-3.min.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error: generic parameters may not be used in const operations
- --> $DIR/issue-67945-3.rs:11:23
- |
-LL | let x: Option<S> = None;
- | ^ cannot perform const operation using `S`
- |
- = note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error[E0392]: parameter `S` is never used
- --> $DIR/issue-67945-3.rs:9:12
- |
-LL | struct Bug<S> {
- | ^ unused parameter
- |
- = help: consider removing `S`, referring to it in a field, or using a marker such as `PhantomData`
- = help: if you intended `S` to be a const parameter, use `const S: usize` instead
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0392`.
diff --git a/src/test/ui/const-generics/issues/issue-67945-3.rs b/src/test/ui/const-generics/issues/issue-67945-3.rs
deleted file mode 100644
index fd8a393ef..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-3.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Regression test for
-// https://github.com/rust-lang/rust/issues/67945#issuecomment-572617285
-// Make sure we don't emit an E0277 error.
-
-// revisions: full min
-#![cfg_attr(full, feature(generic_const_exprs))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-struct Bug<S> { //[min]~ ERROR: parameter `S` is never used
- A: [(); { //[full]~ ERROR: overly complex generic constant
- let x: Option<S> = None;
- //[min]~^ ERROR: generic parameters may not be used in const operations
- 0
- }],
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-67945-4.full.stderr b/src/test/ui/const-generics/issues/issue-67945-4.full.stderr
deleted file mode 100644
index 9604eb35d..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-4.full.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error: overly complex generic constant
- --> $DIR/issue-67945-4.rs:9:13
- |
-LL | A: [(); {
- | _____________^
-LL | | let x: Option<Box<S>> = None;
-LL | |
-LL | | 0
-LL | | }],
- | |_____^ blocks are not supported in generic constant
- |
- = help: consider moving this anonymous constant into a `const` function
- = note: this operation may be supported in the future
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-67945-4.min.stderr b/src/test/ui/const-generics/issues/issue-67945-4.min.stderr
deleted file mode 100644
index f9520872d..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-4.min.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error: generic parameters may not be used in const operations
- --> $DIR/issue-67945-4.rs:10:27
- |
-LL | let x: Option<Box<S>> = None;
- | ^ cannot perform const operation using `S`
- |
- = note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error[E0392]: parameter `S` is never used
- --> $DIR/issue-67945-4.rs:8:12
- |
-LL | struct Bug<S> {
- | ^ unused parameter
- |
- = help: consider removing `S`, referring to it in a field, or using a marker such as `PhantomData`
- = help: if you intended `S` to be a const parameter, use `const S: usize` instead
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0392`.
diff --git a/src/test/ui/const-generics/issues/issue-67945-4.rs b/src/test/ui/const-generics/issues/issue-67945-4.rs
deleted file mode 100644
index 9a27bf09f..000000000
--- a/src/test/ui/const-generics/issues/issue-67945-4.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Regression test for
-// https://github.com/rust-lang/rust/issues/67945#issuecomment-572617285
-
-// revisions: full min
-#![cfg_attr(full, feature(generic_const_exprs))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-struct Bug<S> { //[min]~ ERROR: parameter `S` is never used
- A: [(); { //[full]~ ERROR: overly complex generic constant
- let x: Option<Box<S>> = None;
- //[min]~^ ERROR: generic parameters may not be used in const operations
- 0
- }],
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-68104-print-stack-overflow.rs b/src/test/ui/const-generics/issues/issue-68104-print-stack-overflow.rs
deleted file mode 100644
index ad5710baa..000000000
--- a/src/test/ui/const-generics/issues/issue-68104-print-stack-overflow.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:impl-const.rs
-// run-pass
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-extern crate impl_const;
-
-use impl_const::*;
-
-pub fn main() {
- let n = Num::<5>;
- n.five();
-}
diff --git a/src/test/ui/const-generics/issues/issue-68366.full.stderr b/src/test/ui/const-generics/issues/issue-68366.full.stderr
deleted file mode 100644
index ca9eb801d..000000000
--- a/src/test/ui/const-generics/issues/issue-68366.full.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
- --> $DIR/issue-68366.rs:11:7
- |
-LL | impl <const N: usize> Collatz<{Some(N)}> {}
- | ^^^^^^^^^^^^^^ unconstrained const parameter
- |
- = note: expressions using a const parameter must map each value to a distinct output value
- = note: proving the result of expressions other than the parameter are unique is not supported
-
-error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
- --> $DIR/issue-68366.rs:17:6
- |
-LL | impl<const N: usize> Foo {}
- | ^^^^^^^^^^^^^^ unconstrained const parameter
- |
- = note: expressions using a const parameter must map each value to a distinct output value
- = note: proving the result of expressions other than the parameter are unique is not supported
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0207`.
diff --git a/src/test/ui/const-generics/issues/issue-68366.min.stderr b/src/test/ui/const-generics/issues/issue-68366.min.stderr
deleted file mode 100644
index 3740ced90..000000000
--- a/src/test/ui/const-generics/issues/issue-68366.min.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error: generic parameters may not be used in const operations
- --> $DIR/issue-68366.rs:11:37
- |
-LL | impl <const N: usize> Collatz<{Some(N)}> {}
- | ^ cannot perform const operation using `N`
- |
- = help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
- --> $DIR/issue-68366.rs:11:7
- |
-LL | impl <const N: usize> Collatz<{Some(N)}> {}
- | ^^^^^^^^^^^^^^ unconstrained const parameter
- |
- = note: expressions using a const parameter must map each value to a distinct output value
- = note: proving the result of expressions other than the parameter are unique is not supported
-
-error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
- --> $DIR/issue-68366.rs:17:6
- |
-LL | impl<const N: usize> Foo {}
- | ^^^^^^^^^^^^^^ unconstrained const parameter
- |
- = note: expressions using a const parameter must map each value to a distinct output value
- = note: proving the result of expressions other than the parameter are unique is not supported
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0207`.
diff --git a/src/test/ui/const-generics/issues/issue-68366.rs b/src/test/ui/const-generics/issues/issue-68366.rs
deleted file mode 100644
index 4c2741ab4..000000000
--- a/src/test/ui/const-generics/issues/issue-68366.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Checks that const expressions have a useful note explaining why they can't be evaluated.
-// The note should relate to the fact that it cannot be shown forall N that it maps 1-1 to a new
-// type.
-
-// revisions: full min
-#![cfg_attr(full, feature(generic_const_exprs))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-struct Collatz<const N: Option<usize>>;
-
-impl <const N: usize> Collatz<{Some(N)}> {}
-//~^ ERROR the const parameter
-//[min]~^^ generic parameters may not be used in const operations
-
-struct Foo;
-
-impl<const N: usize> Foo {}
-//~^ ERROR the const parameter
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-68596.rs b/src/test/ui/const-generics/issues/issue-68596.rs
deleted file mode 100644
index c3c9141e4..000000000
--- a/src/test/ui/const-generics/issues/issue-68596.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// check-pass
-pub struct S(u8);
-
-impl S {
- pub fn get<const A: u8>(&self) -> &u8 {
- &self.0
- }
-}
-
-fn main() {
- const A: u8 = 5;
- let s = S(0);
-
- s.get::<A>();
-}
diff --git a/src/test/ui/const-generics/issues/issue-68615-adt.min.stderr b/src/test/ui/const-generics/issues/issue-68615-adt.min.stderr
deleted file mode 100644
index df04c4896..000000000
--- a/src/test/ui/const-generics/issues/issue-68615-adt.min.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: `[usize; 0]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-68615-adt.rs:6:23
- |
-LL | struct Const<const V: [usize; 0]> {}
- | ^^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-68615-adt.rs b/src/test/ui/const-generics/issues/issue-68615-adt.rs
deleted file mode 100644
index 3ef1ad45e..000000000
--- a/src/test/ui/const-generics/issues/issue-68615-adt.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// [full] check-pass
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-struct Const<const V: [usize; 0]> {}
-//[min]~^ ERROR `[usize; 0]` is forbidden as the type of a const generic parameter
-type MyConst = Const<{ [] }>;
-
-fn main() {
- let _x = Const::<{ [] }> {};
- let _y = MyConst {};
-}
diff --git a/src/test/ui/const-generics/issues/issue-68615-array.min.stderr b/src/test/ui/const-generics/issues/issue-68615-array.min.stderr
deleted file mode 100644
index 1b4517087..000000000
--- a/src/test/ui/const-generics/issues/issue-68615-array.min.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: `[usize; 0]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-68615-array.rs:6:21
- |
-LL | struct Foo<const V: [usize; 0] > {}
- | ^^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-68615-array.rs b/src/test/ui/const-generics/issues/issue-68615-array.rs
deleted file mode 100644
index 93477be41..000000000
--- a/src/test/ui/const-generics/issues/issue-68615-array.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// [full] check-pass
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-struct Foo<const V: [usize; 0] > {}
-//[min]~^ ERROR `[usize; 0]` is forbidden as the type of a const generic parameter
-
-type MyFoo = Foo<{ [] }>;
-
-fn main() {
- let _ = Foo::<{ [] }> {};
-}
diff --git a/src/test/ui/const-generics/issues/issue-69654-run-pass.rs b/src/test/ui/const-generics/issues/issue-69654-run-pass.rs
deleted file mode 100644
index 63d7fde78..000000000
--- a/src/test/ui/const-generics/issues/issue-69654-run-pass.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-pass
-trait Bar<T> {}
-impl<T> Bar<T> for [u8; 7] {}
-
-struct Foo<const N: usize> {}
-impl<const N: usize> Foo<N>
-where
- [u8; N]: Bar<[(); N]>,
-{
- fn foo() {}
-}
-
-fn main() {
- Foo::foo();
-}
diff --git a/src/test/ui/const-generics/issues/issue-70125-1.rs b/src/test/ui/const-generics/issues/issue-70125-1.rs
deleted file mode 100644
index 0027cd46a..000000000
--- a/src/test/ui/const-generics/issues/issue-70125-1.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// run-pass
-
-const L: usize = 4;
-
-pub trait Print<const N: usize> {
- fn print(&self) -> usize {
- N
- }
-}
-
-pub struct Printer;
-impl Print<L> for Printer {}
-
-fn main() {
- let p = Printer;
- assert_eq!(p.print(), 4);
-}
diff --git a/src/test/ui/const-generics/issues/issue-70125-2.rs b/src/test/ui/const-generics/issues/issue-70125-2.rs
deleted file mode 100644
index cfd5e784e..000000000
--- a/src/test/ui/const-generics/issues/issue-70125-2.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// run-pass
-fn main() {
- <()>::foo();
-}
-
-trait Foo<const X: usize> {
- fn foo() -> usize {
- X
- }
-}
-
-impl Foo<3> for () {}
diff --git a/src/test/ui/const-generics/issues/issue-70167.rs b/src/test/ui/const-generics/issues/issue-70167.rs
deleted file mode 100644
index 3961941f8..000000000
--- a/src/test/ui/const-generics/issues/issue-70167.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// check-pass
-pub trait Trait<const N: usize>: From<<Self as Trait<N>>::Item> {
- type Item;
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-70180-1-stalled_on.rs b/src/test/ui/const-generics/issues/issue-70180-1-stalled_on.rs
deleted file mode 100644
index 2ec37cc3a..000000000
--- a/src/test/ui/const-generics/issues/issue-70180-1-stalled_on.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// build-pass
-
-pub fn works() {
- let array/*: [_; _]*/ = default_array();
- let _: [_; 4] = array;
- Foo::foo(&array);
-}
-
-pub fn didnt_work() {
- let array/*: [_; _]*/ = default_array();
- Foo::foo(&array);
- let _: [_; 4] = array;
-}
-
-trait Foo {
- fn foo(&self) {}
-}
-
-impl Foo for [i32; 4] {}
-impl Foo for [i64; 8] {}
-
-// Only needed because `[_; _]` is not valid type syntax.
-fn default_array<T, const N: usize>() -> [T; N]
-where
- [T; N]: Default,
-{
- Default::default()
-}
-
-fn main() {
- works();
- didnt_work();
-}
diff --git a/src/test/ui/const-generics/issues/issue-70180-2-stalled_on.rs b/src/test/ui/const-generics/issues/issue-70180-2-stalled_on.rs
deleted file mode 100644
index 95e548428..000000000
--- a/src/test/ui/const-generics/issues/issue-70180-2-stalled_on.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// build-pass
-
-fn works() {
- let array/*: [u8; _]*/ = default_byte_array();
- let _: [_; 4] = array;
- Foo::foo(&array);
-}
-
-fn didnt_work() {
- let array/*: [u8; _]*/ = default_byte_array();
- Foo::foo(&array);
- let _: [_; 4] = array;
-}
-
-trait Foo<T> {
- fn foo(&self) {}
-}
-
-impl Foo<i32> for [u8; 4] {}
-impl Foo<i64> for [u8; 8] {}
-
-// Only needed because `[u8; _]` is not valid type syntax.
-fn default_byte_array<const N: usize>() -> [u8; N]
-where
- [u8; N]: Default,
-{
- Default::default()
-}
-
-fn main() {
- works();
- didnt_work();
-}
diff --git a/src/test/ui/const-generics/issues/issue-70225.rs b/src/test/ui/const-generics/issues/issue-70225.rs
deleted file mode 100644
index d458d7b2e..000000000
--- a/src/test/ui/const-generics/issues/issue-70225.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// check-pass
-#![deny(dead_code)]
-
-// We previously incorrectly linted `L` as unused here.
-const L: usize = 3;
-
-fn main() {
- let p = Printer {};
- p.print();
-}
-
-trait Print<const N: usize> {
- fn print(&self) -> usize {
- 3
- }
-}
-
-struct Printer {}
-impl Print<L> for Printer {}
diff --git a/src/test/ui/const-generics/issues/issue-70273-assoc-fn.rs b/src/test/ui/const-generics/issues/issue-70273-assoc-fn.rs
deleted file mode 100644
index a76488249..000000000
--- a/src/test/ui/const-generics/issues/issue-70273-assoc-fn.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// check-pass
-
-trait T<const A: usize> {
- fn f();
-}
-struct S;
-
-impl T<0usize> for S {
- fn f() {}
-}
-
-fn main() {
- let _err = <S as T<0usize>>::f();
-}
diff --git a/src/test/ui/const-generics/issues/issue-71169.full.stderr b/src/test/ui/const-generics/issues/issue-71169.full.stderr
deleted file mode 100644
index 1f5880f36..000000000
--- a/src/test/ui/const-generics/issues/issue-71169.full.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-71169.rs:5:43
- |
-LL | fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
- | ^^^ the type must not depend on the parameter `LEN`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0770`.
diff --git a/src/test/ui/const-generics/issues/issue-71169.min.stderr b/src/test/ui/const-generics/issues/issue-71169.min.stderr
deleted file mode 100644
index 87ed2d4f8..000000000
--- a/src/test/ui/const-generics/issues/issue-71169.min.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-71169.rs:5:43
- |
-LL | fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
- | ^^^ the type must not depend on the parameter `LEN`
-
-error: `[u8; _]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-71169.rs:5:38
- |
-LL | fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
- | ^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0770`.
diff --git a/src/test/ui/const-generics/issues/issue-71169.rs b/src/test/ui/const-generics/issues/issue-71169.rs
deleted file mode 100644
index 617149a84..000000000
--- a/src/test/ui/const-generics/issues/issue-71169.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
-//~^ ERROR the type of const parameters must not
-//[min]~^^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter
-fn main() {
- const DATA: [u8; 4] = *b"ABCD";
- foo::<4, DATA>();
-}
diff --git a/src/test/ui/const-generics/issues/issue-71202.rs b/src/test/ui/const-generics/issues/issue-71202.rs
deleted file mode 100644
index 57fd72b12..000000000
--- a/src/test/ui/const-generics/issues/issue-71202.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features, const_evaluatable_unchecked)]
-
-use std::marker::PhantomData;
-
-struct DataHolder<T> {
- item: T,
-}
-
-impl<T: Copy> DataHolder<T> {
- const ITEM_IS_COPY: [(); 1 - { //~ ERROR unconstrained generic constant
- trait NotCopy {
- const VALUE: bool = false;
- }
-
- impl<__Type: ?Sized> NotCopy for __Type {}
-
- struct IsCopy<__Type: ?Sized>(PhantomData<__Type>);
-
- impl<__Type> IsCopy<__Type>
- where
- __Type: Sized + Copy,
- {
- const VALUE: bool = true;
- }
-
- <IsCopy<T>>::VALUE
- } as usize] = [];
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-71202.stderr b/src/test/ui/const-generics/issues/issue-71202.stderr
deleted file mode 100644
index 277540610..000000000
--- a/src/test/ui/const-generics/issues/issue-71202.stderr
+++ /dev/null
@@ -1,33 +0,0 @@
-error: unconstrained generic constant
- --> $DIR/issue-71202.rs:11:5
- |
-LL | / const ITEM_IS_COPY: [(); 1 - {
-LL | | trait NotCopy {
-LL | | const VALUE: bool = false;
-LL | | }
-... |
-LL | | <IsCopy<T>>::VALUE
-LL | | } as usize] = [];
- | |_____________________^
- |
- = help: try adding a `where` bound using this expression: `where [(); 1 - {
- trait NotCopy {
- const VALUE: bool = false;
- }
-
- impl<__Type: ?Sized> NotCopy for __Type {}
-
- struct IsCopy<__Type: ?Sized>(PhantomData<__Type>);
-
- impl<__Type> IsCopy<__Type>
- where
- __Type: Sized + Copy,
- {
- const VALUE: bool = true;
- }
-
- <IsCopy<T>>::VALUE
- } as usize]:`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-71381.full.stderr b/src/test/ui/const-generics/issues/issue-71381.full.stderr
deleted file mode 100644
index e17cf96aa..000000000
--- a/src/test/ui/const-generics/issues/issue-71381.full.stderr
+++ /dev/null
@@ -1,28 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-71381.rs:14:82
- |
-LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
- | ^^^^ the type must not depend on the parameter `Args`
-
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-71381.rs:23:40
- |
-LL | const FN: unsafe extern "C" fn(Args),
- | ^^^^ the type must not depend on the parameter `Args`
-
-error[E0741]: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-71381.rs:14:61
- |
-LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0741]: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-71381.rs:23:19
- |
-LL | const FN: unsafe extern "C" fn(Args),
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0741, E0770.
-For more information about an error, try `rustc --explain E0741`.
diff --git a/src/test/ui/const-generics/issues/issue-71381.min.stderr b/src/test/ui/const-generics/issues/issue-71381.min.stderr
deleted file mode 100644
index 3950317b3..000000000
--- a/src/test/ui/const-generics/issues/issue-71381.min.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-71381.rs:14:82
- |
-LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
- | ^^^^ the type must not depend on the parameter `Args`
-
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-71381.rs:23:40
- |
-LL | const FN: unsafe extern "C" fn(Args),
- | ^^^^ the type must not depend on the parameter `Args`
-
-error: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-71381.rs:14:61
- |
-LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-71381.rs:23:19
- |
-LL | const FN: unsafe extern "C" fn(Args),
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0770`.
diff --git a/src/test/ui/const-generics/issues/issue-71381.rs b/src/test/ui/const-generics/issues/issue-71381.rs
deleted file mode 100644
index 66f819dbe..000000000
--- a/src/test/ui/const-generics/issues/issue-71381.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-struct Test(*const usize);
-
-type PassArg = ();
-
-unsafe extern "C" fn pass(args: PassArg) {
- println!("Hello, world!");
-}
-
-impl Test {
- pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
- //~^ ERROR: using function pointers as const generic parameters is forbidden
- //~| ERROR: the type of const parameters must not depend on other generic parameters
- self.0 = Self::trampiline::<Args, IDX, FN> as _
- }
-
- unsafe extern "C" fn trampiline<
- Args: Sized,
- const IDX: usize,
- const FN: unsafe extern "C" fn(Args),
- //~^ ERROR: using function pointers as const generic parameters is forbidden
- //~| ERROR: the type of const parameters must not depend on other generic parameters
- >(
- args: Args,
- ) {
- FN(args)
- }
-}
-
-fn main() {
- let x = Test();
- x.call_me::<PassArg, 30, pass>()
-}
diff --git a/src/test/ui/const-generics/issues/issue-71382.full.stderr b/src/test/ui/const-generics/issues/issue-71382.full.stderr
deleted file mode 100644
index ab2a4e64a..000000000
--- a/src/test/ui/const-generics/issues/issue-71382.full.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0741]: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-71382.rs:16:23
- |
-LL | fn test<const FN: fn()>(&self) {
- | ^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0741`.
diff --git a/src/test/ui/const-generics/issues/issue-71382.min.stderr b/src/test/ui/const-generics/issues/issue-71382.min.stderr
deleted file mode 100644
index 715037bd5..000000000
--- a/src/test/ui/const-generics/issues/issue-71382.min.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-71382.rs:16:23
- |
-LL | fn test<const FN: fn()>(&self) {
- | ^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-71382.rs b/src/test/ui/const-generics/issues/issue-71382.rs
deleted file mode 100644
index 4392d72e5..000000000
--- a/src/test/ui/const-generics/issues/issue-71382.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-struct Test();
-
-fn pass() {
- println!("Hello, world!");
-}
-
-impl Test {
- pub fn call_me(&self) {
- self.test::<pass>();
- }
-
- fn test<const FN: fn()>(&self) {
- //~^ ERROR: using function pointers as const generic parameters is forbidden
- FN();
- }
-}
-
-fn main() {
- let x = Test();
- x.call_me()
-}
diff --git a/src/test/ui/const-generics/issues/issue-71547.rs b/src/test/ui/const-generics/issues/issue-71547.rs
deleted file mode 100644
index 60776a1a9..000000000
--- a/src/test/ui/const-generics/issues/issue-71547.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// check-pass
-
-#![feature(adt_const_params)]
-#![allow(incomplete_features)]
-
-pub trait GetType<const N: &'static str> {
- type Ty;
- fn get(&self) -> &Self::Ty;
-}
-
-pub fn get_val<T>(value: &T) -> &T::Ty
-where
- T: GetType<"hello">,
-{
- value.get()
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-71611.full.stderr b/src/test/ui/const-generics/issues/issue-71611.full.stderr
deleted file mode 100644
index 656aa29e1..000000000
--- a/src/test/ui/const-generics/issues/issue-71611.full.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-71611.rs:5:31
- |
-LL | fn func<A, const F: fn(inner: A)>(outer: A) {
- | ^ the type must not depend on the parameter `A`
-
-error[E0741]: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-71611.rs:5:21
- |
-LL | fn func<A, const F: fn(inner: A)>(outer: A) {
- | ^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0741, E0770.
-For more information about an error, try `rustc --explain E0741`.
diff --git a/src/test/ui/const-generics/issues/issue-71611.min.stderr b/src/test/ui/const-generics/issues/issue-71611.min.stderr
deleted file mode 100644
index 01a85b745..000000000
--- a/src/test/ui/const-generics/issues/issue-71611.min.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-71611.rs:5:31
- |
-LL | fn func<A, const F: fn(inner: A)>(outer: A) {
- | ^ the type must not depend on the parameter `A`
-
-error: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-71611.rs:5:21
- |
-LL | fn func<A, const F: fn(inner: A)>(outer: A) {
- | ^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0770`.
diff --git a/src/test/ui/const-generics/issues/issue-71611.rs b/src/test/ui/const-generics/issues/issue-71611.rs
deleted file mode 100644
index fbb91ca18..000000000
--- a/src/test/ui/const-generics/issues/issue-71611.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-fn func<A, const F: fn(inner: A)>(outer: A) {
- //~^ ERROR: using function pointers as const generic parameters is forbidden
- //~| ERROR: the type of const parameters must not depend on other generic parameters
- F(outer);
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-71986.rs b/src/test/ui/const-generics/issues/issue-71986.rs
deleted file mode 100644
index 6f0a98ead..000000000
--- a/src/test/ui/const-generics/issues/issue-71986.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// check-pass
-
-pub trait Foo<const B: bool> {}
-pub fn bar<T: Foo<{ true }>>() {}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-72352.full.stderr b/src/test/ui/const-generics/issues/issue-72352.full.stderr
deleted file mode 100644
index 92580b336..000000000
--- a/src/test/ui/const-generics/issues/issue-72352.full.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0741]: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-72352.rs:7:42
- |
-LL | unsafe fn unsafely_do_the_thing<const F: fn(&CStr) -> usize>(ptr: *const i8) -> usize {
- | ^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0741`.
diff --git a/src/test/ui/const-generics/issues/issue-72352.min.stderr b/src/test/ui/const-generics/issues/issue-72352.min.stderr
deleted file mode 100644
index eedd73c4d..000000000
--- a/src/test/ui/const-generics/issues/issue-72352.min.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-72352.rs:7:42
- |
-LL | unsafe fn unsafely_do_the_thing<const F: fn(&CStr) -> usize>(ptr: *const i8) -> usize {
- | ^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-72352.rs b/src/test/ui/const-generics/issues/issue-72352.rs
deleted file mode 100644
index 2fa1d7a53..000000000
--- a/src/test/ui/const-generics/issues/issue-72352.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-use std::ffi::{CStr, CString};
-
-unsafe fn unsafely_do_the_thing<const F: fn(&CStr) -> usize>(ptr: *const i8) -> usize {
- //~^ ERROR: using function pointers as const generic parameters is forbidden
- F(CStr::from_ptr(ptr))
-}
-
-fn safely_do_the_thing(s: &CStr) -> usize {
- s.to_bytes().len()
-}
-
-fn main() {
- let baguette = CString::new("baguette").unwrap();
- let ptr = baguette.as_ptr();
- println!("{}", unsafe {
- unsafely_do_the_thing::<safely_do_the_thing>(ptr)
- });
-}
diff --git a/src/test/ui/const-generics/issues/issue-72845.rs b/src/test/ui/const-generics/issues/issue-72845.rs
deleted file mode 100644
index bea5dc8ba..000000000
--- a/src/test/ui/const-generics/issues/issue-72845.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-#![feature(generic_const_exprs)]
-#![feature(specialization)]
-#![allow(incomplete_features)]
-
-//--------------------------------------------------
-
-trait Depth {
- const C: usize;
-}
-
-trait Type {
- type AT: Depth;
-}
-
-//--------------------------------------------------
-
-enum Predicate<const B: bool> {}
-
-trait Satisfied {}
-
-impl Satisfied for Predicate<true> {}
-
-//--------------------------------------------------
-
-trait Spec1 {}
-
-impl<T: Type> Spec1 for T where Predicate<{T::AT::C > 0}>: Satisfied {}
-
-trait Spec2 {}
-
-//impl<T: Type > Spec2 for T where Predicate<{T::AT::C > 1}>: Satisfied {}
-impl<T: Type > Spec2 for T where Predicate<true>: Satisfied {}
-
-//--------------------------------------------------
-
-trait Foo {
- fn Bar();
-}
-
-impl<T: Spec1> Foo for T {
- default fn Bar() {}
-}
-
-impl<T: Spec2> Foo for T {
-//~^ ERROR conflicting implementations of trait
- fn Bar() {}
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-72845.stderr b/src/test/ui/const-generics/issues/issue-72845.stderr
deleted file mode 100644
index 631c8605f..000000000
--- a/src/test/ui/const-generics/issues/issue-72845.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0119]: conflicting implementations of trait `Foo`
- --> $DIR/issue-72845.rs:44:1
- |
-LL | impl<T: Spec1> Foo for T {
- | ------------------------ first implementation here
-...
-LL | impl<T: Spec2> Foo for T {
- | ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/src/test/ui/const-generics/issues/issue-73120.rs b/src/test/ui/const-generics/issues/issue-73120.rs
deleted file mode 100644
index 050dc9bde..000000000
--- a/src/test/ui/const-generics/issues/issue-73120.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// check-pass
-// aux-build:const_generic_issues_lib.rs
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-extern crate const_generic_issues_lib as lib2;
-fn unused_function(
- _: <lib2::GenericType<42> as lib2::TypeFn>::Output
-) {}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-73260.rs b/src/test/ui/const-generics/issues/issue-73260.rs
deleted file mode 100644
index d762f9c8b..000000000
--- a/src/test/ui/const-generics/issues/issue-73260.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// compile-flags: -Zsave-analysis
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-struct Arr<const N: usize>
-where
- Assert::<{N < usize::MAX / 2}>: IsTrue,
-{}
-
-enum Assert<const CHECK: bool> {}
-
-trait IsTrue {}
-
-impl IsTrue for Assert<true> {}
-
-fn main() {
- let x: Arr<{usize::MAX}> = Arr {};
- //~^ ERROR mismatched types
- //~| ERROR mismatched types
-}
diff --git a/src/test/ui/const-generics/issues/issue-73260.stderr b/src/test/ui/const-generics/issues/issue-73260.stderr
deleted file mode 100644
index 7670032e5..000000000
--- a/src/test/ui/const-generics/issues/issue-73260.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-73260.rs:16:12
- |
-LL | let x: Arr<{usize::MAX}> = Arr {};
- | ^^^^^^^^^^^^^^^^^ expected `false`, found `true`
- |
- = note: expected constant `false`
- found constant `true`
-note: required by a bound in `Arr`
- --> $DIR/issue-73260.rs:6:37
- |
-LL | struct Arr<const N: usize>
- | --- required by a bound in this
-LL | where
-LL | Assert::<{N < usize::MAX / 2}>: IsTrue,
- | ^^^^^^ required by this bound in `Arr`
-
-error[E0308]: mismatched types
- --> $DIR/issue-73260.rs:16:32
- |
-LL | let x: Arr<{usize::MAX}> = Arr {};
- | ^^^ expected `false`, found `true`
- |
- = note: expected constant `false`
- found constant `true`
-note: required by a bound in `Arr`
- --> $DIR/issue-73260.rs:6:37
- |
-LL | struct Arr<const N: usize>
- | --- required by a bound in this
-LL | where
-LL | Assert::<{N < usize::MAX / 2}>: IsTrue,
- | ^^^^^^ required by this bound in `Arr`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/const-generics/issues/issue-73491.min.stderr b/src/test/ui/const-generics/issues/issue-73491.min.stderr
deleted file mode 100644
index f2b58e59f..000000000
--- a/src/test/ui/const-generics/issues/issue-73491.min.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: `[u32; _]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-73491.rs:8:19
- |
-LL | fn hoge<const IN: [u32; LEN]>() {}
- | ^^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-73491.rs b/src/test/ui/const-generics/issues/issue-73491.rs
deleted file mode 100644
index f15c1f2d4..000000000
--- a/src/test/ui/const-generics/issues/issue-73491.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// [full] check-pass
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-const LEN: usize = 1024;
-
-fn hoge<const IN: [u32; LEN]>() {}
-//[min]~^ ERROR `[u32; _]` is forbidden as the type of a const generic parameter
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr b/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr
deleted file mode 100644
index 0a7db6247..000000000
--- a/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: `&'static [u32]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-73727-static-reference-array-const-param.rs:9:15
- |
-LL | fn a<const X: &'static [u32]>() {}
- | ^^^^^^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs b/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs
deleted file mode 100644
index f0d604835..000000000
--- a/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Regression test for #73727
-
-// revisions: full min
-//[full]check-pass
-
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-fn a<const X: &'static [u32]>() {}
-//[min]~^ ERROR `&'static [u32]` is forbidden as the type of a const generic parameter
-
-fn main() {
- a::<{&[]}>();
-}
diff --git a/src/test/ui/const-generics/issues/issue-74101.min.stderr b/src/test/ui/const-generics/issues/issue-74101.min.stderr
deleted file mode 100644
index 82ffb2332..000000000
--- a/src/test/ui/const-generics/issues/issue-74101.min.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: `[u8; _]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-74101.rs:6:18
- |
-LL | fn test<const N: [u8; 1 + 2]>() {}
- | ^^^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: `[u8; _]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-74101.rs:9:21
- |
-LL | struct Foo<const N: [u8; 1 + 2]>;
- | ^^^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/const-generics/issues/issue-74101.rs b/src/test/ui/const-generics/issues/issue-74101.rs
deleted file mode 100644
index 6b606b946..000000000
--- a/src/test/ui/const-generics/issues/issue-74101.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// [full] check-pass
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-fn test<const N: [u8; 1 + 2]>() {}
-//[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter
-
-struct Foo<const N: [u8; 1 + 2]>;
-//[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-74255.min.stderr b/src/test/ui/const-generics/issues/issue-74255.min.stderr
deleted file mode 100644
index b462d8448..000000000
--- a/src/test/ui/const-generics/issues/issue-74255.min.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: `IceEnum` is forbidden as the type of a const generic parameter
- --> $DIR/issue-74255.rs:14:31
- |
-LL | fn ice_struct_fn<const I: IceEnum>() {}
- | ^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-74255.rs b/src/test/ui/const-generics/issues/issue-74255.rs
deleted file mode 100644
index 0e523926f..000000000
--- a/src/test/ui/const-generics/issues/issue-74255.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// [full] check-pass
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-#[derive(PartialEq, Eq)]
-enum IceEnum {
- Variant
-}
-
-struct IceStruct;
-
-impl IceStruct {
- fn ice_struct_fn<const I: IceEnum>() {}
- //[min]~^ ERROR `IceEnum` is forbidden as the type of a const generic parameter
-}
-
-fn main() {
- IceStruct::ice_struct_fn::<{IceEnum::Variant}>();
-}
diff --git a/src/test/ui/const-generics/issues/issue-74906.rs b/src/test/ui/const-generics/issues/issue-74906.rs
deleted file mode 100644
index cc1f2853f..000000000
--- a/src/test/ui/const-generics/issues/issue-74906.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// edition:2018
-// check-pass
-
-
-const SIZE: usize = 16;
-
-struct Bar<const H: usize> {}
-
-struct Foo<const H: usize> {}
-
-impl<const H: usize> Foo<H> {
- async fn biz(_: &[[u8; SIZE]]) -> Vec<()> {
- vec![]
- }
-
- pub async fn baz(&self) -> Bar<H> {
- Self::biz(&vec![]).await;
- Bar {}
- }
-}
-
-fn main() { }
diff --git a/src/test/ui/const-generics/issues/issue-74950.min.stderr b/src/test/ui/const-generics/issues/issue-74950.min.stderr
deleted file mode 100644
index 729ecc202..000000000
--- a/src/test/ui/const-generics/issues/issue-74950.min.stderr
+++ /dev/null
@@ -1,47 +0,0 @@
-error: `Inner` is forbidden as the type of a const generic parameter
- --> $DIR/issue-74950.rs:17:23
- |
-LL | struct Outer<const I: Inner>;
- | ^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: `Inner` is forbidden as the type of a const generic parameter
- --> $DIR/issue-74950.rs:17:23
- |
-LL | struct Outer<const I: Inner>;
- | ^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: `Inner` is forbidden as the type of a const generic parameter
- --> $DIR/issue-74950.rs:17:23
- |
-LL | struct Outer<const I: Inner>;
- | ^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: `Inner` is forbidden as the type of a const generic parameter
- --> $DIR/issue-74950.rs:17:23
- |
-LL | struct Outer<const I: Inner>;
- | ^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: `Inner` is forbidden as the type of a const generic parameter
- --> $DIR/issue-74950.rs:17:23
- |
-LL | struct Outer<const I: Inner>;
- | ^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to 5 previous errors
-
diff --git a/src/test/ui/const-generics/issues/issue-74950.rs b/src/test/ui/const-generics/issues/issue-74950.rs
deleted file mode 100644
index 3e1ca4735..000000000
--- a/src/test/ui/const-generics/issues/issue-74950.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// [full] build-pass
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-
-#[derive(PartialEq, Eq)]
-struct Inner;
-
-// Note: We emit the error 5 times if we don't deduplicate:
-// - struct definition
-// - impl PartialEq
-// - impl Eq
-// - impl StructuralPartialEq
-// - impl StructuralEq
-#[derive(PartialEq, Eq)]
-struct Outer<const I: Inner>;
-//[min]~^ `Inner` is forbidden
-//[min]~| `Inner` is forbidden
-//[min]~| `Inner` is forbidden
-//[min]~| `Inner` is forbidden
-//[min]~| `Inner` is forbidden
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-75047.min.stderr b/src/test/ui/const-generics/issues/issue-75047.min.stderr
deleted file mode 100644
index 7798ae796..000000000
--- a/src/test/ui/const-generics/issues/issue-75047.min.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: `[u8; _]` is forbidden as the type of a const generic parameter
- --> $DIR/issue-75047.rs:14:21
- |
-LL | struct Foo<const N: [u8; Bar::<u32>::value()]>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: the only supported types are integers, `bool` and `char`
- = help: more complex types are supported with `#![feature(adt_const_params)]`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-75047.rs b/src/test/ui/const-generics/issues/issue-75047.rs
deleted file mode 100644
index ee3dcf9ec..000000000
--- a/src/test/ui/const-generics/issues/issue-75047.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// [full] check-pass
-// revisions: full min
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-struct Bar<T>(T);
-
-impl<T> Bar<T> {
- const fn value() -> usize {
- 42
- }
-}
-
-struct Foo<const N: [u8; Bar::<u32>::value()]>;
-//[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-75299.rs b/src/test/ui/const-generics/issues/issue-75299.rs
deleted file mode 100644
index 83ef09af8..000000000
--- a/src/test/ui/const-generics/issues/issue-75299.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// compile-flags: -Zmir-opt-level=4
-// run-pass
-fn main() {
- fn foo<const N: usize>() -> [u8; N] {
- [0; N]
- }
- let _x = foo::<1>();
-}
diff --git a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.rs b/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.rs
deleted file mode 100644
index 2e6b02236..000000000
--- a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-fn ty_param<T>() -> [u8; std::mem::size_of::<T>()] {
- //~^ ERROR generic parameters may not be used in const operations
- todo!()
-}
-
-fn const_param<const N: usize>() -> [u8; N + 1] {
- //~^ ERROR generic parameters may not be used in const operations
- todo!()
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr b/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr
deleted file mode 100644
index 3b53e18e6..000000000
--- a/src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: generic parameters may not be used in const operations
- --> $DIR/issue-76701-ty-param-in-const.rs:1:46
- |
-LL | fn ty_param<T>() -> [u8; std::mem::size_of::<T>()] {
- | ^ cannot perform const operation using `T`
- |
- = note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error: generic parameters may not be used in const operations
- --> $DIR/issue-76701-ty-param-in-const.rs:6:42
- |
-LL | fn const_param<const N: usize>() -> [u8; N + 1] {
- | ^ cannot perform const operation using `N`
- |
- = help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/const-generics/issues/issue-77357.rs b/src/test/ui/const-generics/issues/issue-77357.rs
deleted file mode 100644
index 3cb8d3846..000000000
--- a/src/test/ui/const-generics/issues/issue-77357.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-trait MyTrait<T> {}
-
-fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
- //~^ ERROR overly complex generic constant
- todo!()
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-77357.stderr b/src/test/ui/const-generics/issues/issue-77357.stderr
deleted file mode 100644
index 804c0ae51..000000000
--- a/src/test/ui/const-generics/issues/issue-77357.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: overly complex generic constant
- --> $DIR/issue-77357.rs:6:46
- |
-LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ blocks are not supported in generic constant
- |
- = help: consider moving this anonymous constant into a `const` function
- = note: this operation may be supported in the future
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-79674.rs b/src/test/ui/const-generics/issues/issue-79674.rs
deleted file mode 100644
index ff141d328..000000000
--- a/src/test/ui/const-generics/issues/issue-79674.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-trait MiniTypeId {
- const TYPE_ID: u64;
-}
-
-impl<T> MiniTypeId for T {
- const TYPE_ID: u64 = 0;
-}
-
-enum Lift<const V: bool> {}
-
-trait IsFalse {}
-impl IsFalse for Lift<false> {}
-
-const fn is_same_type<T: MiniTypeId, U: MiniTypeId>() -> bool {
- T::TYPE_ID == U::TYPE_ID
-}
-
-fn requires_distinct<A, B>(_a: A, _b: B) where
- A: MiniTypeId, B: MiniTypeId,
- Lift<{is_same_type::<A, B>()}>: IsFalse {}
-
-fn main() {
- requires_distinct("str", 12);
- //~^ ERROR mismatched types
-}
diff --git a/src/test/ui/const-generics/issues/issue-79674.stderr b/src/test/ui/const-generics/issues/issue-79674.stderr
deleted file mode 100644
index 02b48b55f..000000000
--- a/src/test/ui/const-generics/issues/issue-79674.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-79674.rs:26:5
- |
-LL | requires_distinct("str", 12);
- | ^^^^^^^^^^^^^^^^^ expected `true`, found `false`
- |
- = note: expected constant `true`
- found constant `false`
-note: required by a bound in `requires_distinct`
- --> $DIR/issue-79674.rs:23:37
- |
-LL | fn requires_distinct<A, B>(_a: A, _b: B) where
- | ----------------- required by a bound in this
-LL | A: MiniTypeId, B: MiniTypeId,
-LL | Lift<{is_same_type::<A, B>()}>: IsFalse {}
- | ^^^^^^^ required by this bound in `requires_distinct`
-
-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-80062.rs b/src/test/ui/const-generics/issues/issue-80062.rs
deleted file mode 100644
index 56dc53298..000000000
--- a/src/test/ui/const-generics/issues/issue-80062.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Regression test for issue #80062 (fixed by `min_const_generics`)
-
-fn sof<T>() -> T { unimplemented!() }
-
-fn test<T>() {
- let _: [u8; sof::<T>()];
- //~^ ERROR generic parameters may not be used in const operations
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-80062.stderr b/src/test/ui/const-generics/issues/issue-80062.stderr
deleted file mode 100644
index 754f18d5c..000000000
--- a/src/test/ui/const-generics/issues/issue-80062.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: generic parameters may not be used in const operations
- --> $DIR/issue-80062.rs:6:23
- |
-LL | let _: [u8; sof::<T>()];
- | ^ cannot perform const operation using `T`
- |
- = note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-80375.rs b/src/test/ui/const-generics/issues/issue-80375.rs
deleted file mode 100644
index c906bb2c4..000000000
--- a/src/test/ui/const-generics/issues/issue-80375.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
-//~^ ERROR generic parameters may not be used in const operations
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-80375.stderr b/src/test/ui/const-generics/issues/issue-80375.stderr
deleted file mode 100644
index 5409002a9..000000000
--- a/src/test/ui/const-generics/issues/issue-80375.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: generic parameters may not be used in const operations
- --> $DIR/issue-80375.rs:1:41
- |
-LL | struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
- | ^^^^^ cannot perform const operation using `COUNT`
- |
- = help: const parameters may only be used as standalone arguments, i.e. `COUNT`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-82956.rs b/src/test/ui/const-generics/issues/issue-82956.rs
deleted file mode 100644
index 3539e9b96..000000000
--- a/src/test/ui/const-generics/issues/issue-82956.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub struct ConstCheck<const CHECK: bool>;
-
-pub trait True {}
-impl True for ConstCheck<true> {}
-
-pub trait OrdesDec {
- type Newlen;
- type Output;
-
- fn pop(self) -> (Self::Newlen, Self::Output);
-}
-
-impl<T, const N: usize> OrdesDec for [T; N]
-where
- ConstCheck<{N > 1}>: True,
- [T; N - 1]: Sized,
-{
- type Newlen = [T; N - 1];
- type Output = T;
-
- fn pop(self) -> (Self::Newlen, Self::Output) {
- let mut iter = IntoIter::new(self);
- //~^ ERROR: failed to resolve: use of undeclared type `IntoIter`
- let end = iter.next_back().unwrap();
- let new = [(); N - 1].map(move |()| iter.next().unwrap());
- (new, end)
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-82956.stderr b/src/test/ui/const-generics/issues/issue-82956.stderr
deleted file mode 100644
index d2320293e..000000000
--- a/src/test/ui/const-generics/issues/issue-82956.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0433]: failed to resolve: use of undeclared type `IntoIter`
- --> $DIR/issue-82956.rs:25:24
- |
-LL | let mut iter = IntoIter::new(self);
- | ^^^^^^^^ use of undeclared type `IntoIter`
- |
-help: consider importing one of these items
- |
-LL | use std::array::IntoIter;
- |
-LL | use std::collections::binary_heap::IntoIter;
- |
-LL | use std::collections::btree_map::IntoIter;
- |
-LL | use std::collections::btree_set::IntoIter;
- |
- and 8 other candidates
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0433`.
diff --git a/src/test/ui/const-generics/issues/issue-83249.rs b/src/test/ui/const-generics/issues/issue-83249.rs
deleted file mode 100644
index 65148c55e..000000000
--- a/src/test/ui/const-generics/issues/issue-83249.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(generic_const_exprs)]
-
-trait Foo {
- const N: usize;
-}
-
-impl Foo for u8 {
- const N: usize = 1;
-}
-
-fn foo<T: Foo>(_: [u8; T::N]) -> T {
- todo!()
-}
-
-pub fn bar() {
- let _: u8 = foo([0; 1]);
-
- let _ = foo([0; 1]);
- //~^ ERROR type annotations needed
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-83249.stderr b/src/test/ui/const-generics/issues/issue-83249.stderr
deleted file mode 100644
index 362b8554b..000000000
--- a/src/test/ui/const-generics/issues/issue-83249.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0282]: type annotations needed
- --> $DIR/issue-83249.rs:19:9
- |
-LL | let _ = foo([0; 1]);
- | ^
- |
-help: consider giving this pattern a type
- |
-LL | let _: _ = foo([0; 1]);
- | +++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/ui/const-generics/issues/issue-83288.rs b/src/test/ui/const-generics/issues/issue-83288.rs
deleted file mode 100644
index a24596d24..000000000
--- a/src/test/ui/const-generics/issues/issue-83288.rs
+++ /dev/null
@@ -1,69 +0,0 @@
-// build-pass
-
-#![allow(incomplete_features)]
-#![feature(generic_const_exprs)]
-
-use std::{marker::PhantomData, ops::Mul};
-
-pub enum Nil {}
-pub struct Cons<T, L> {
- _phantom: PhantomData<(T, L)>,
-}
-
-pub trait Indices<const N: usize> {
- const RANK: usize;
- const NUM_ELEMS: usize;
-}
-
-impl<const N: usize> Indices<N> for Nil {
- const RANK: usize = 0;
- const NUM_ELEMS: usize = 1;
-}
-
-impl<T, I: Indices<N>, const N: usize> Indices<N> for Cons<T, I> {
- const RANK: usize = I::RANK + 1;
- const NUM_ELEMS: usize = I::NUM_ELEMS * N;
-}
-
-pub trait Concat<J> {
- type Output;
-}
-
-impl<J> Concat<J> for Nil {
- type Output = J;
-}
-
-impl<T, I, J> Concat<J> for Cons<T, I>
-where
- I: Concat<J>,
-{
- type Output = Cons<T, <I as Concat<J>>::Output>;
-}
-
-pub struct Tensor<I: Indices<N>, const N: usize>
-where
- [u8; I::NUM_ELEMS]: Sized,
-{
- pub data: [u8; I::NUM_ELEMS],
- _phantom: PhantomData<I>,
-}
-
-impl<I: Indices<N>, J: Indices<N>, const N: usize> Mul<Tensor<J, N>> for Tensor<I, N>
-where
- I: Concat<J>,
- <I as Concat<J>>::Output: Indices<N>,
- [u8; I::NUM_ELEMS]: Sized,
- [u8; J::NUM_ELEMS]: Sized,
- [u8; <I as Concat<J>>::Output::NUM_ELEMS]: Sized,
-{
- type Output = Tensor<<I as Concat<J>>::Output, N>;
-
- fn mul(self, _rhs: Tensor<J, N>) -> Self::Output {
- Tensor {
- data: [0u8; <I as Concat<J>>::Output::NUM_ELEMS],
- _phantom: PhantomData,
- }
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-83466.rs b/src/test/ui/const-generics/issues/issue-83466.rs
deleted file mode 100644
index 73c930101..000000000
--- a/src/test/ui/const-generics/issues/issue-83466.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// regression test for #83466- tests that generic arg mismatch errors between
-// consts and types are not suppressed when there are explicit late bound lifetimes
-
-struct S;
-impl S {
- fn func<'a, U>(self) -> U {
- todo!()
- }
-}
-fn dont_crash<'a, U>() {
- S.func::<'a, 10_u32>()
- //~^ WARNING cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
- //~^^ WARNING this was previously accepted by
- //~^^^ ERROR constant provided when a type was expected [E0747]
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-83466.stderr b/src/test/ui/const-generics/issues/issue-83466.stderr
deleted file mode 100644
index bcfd70639..000000000
--- a/src/test/ui/const-generics/issues/issue-83466.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
- --> $DIR/issue-83466.rs:11:14
- |
-LL | fn func<'a, U>(self) -> U {
- | -- the late bound lifetime parameter is introduced here
-...
-LL | S.func::<'a, 10_u32>()
- | ^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #42868 <https://github.com/rust-lang/rust/issues/42868>
- = note: `#[warn(late_bound_lifetime_arguments)]` on by default
-
-error[E0747]: constant provided when a type was expected
- --> $DIR/issue-83466.rs:11:18
- |
-LL | S.func::<'a, 10_u32>()
- | ^^^^^^
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0747`.
diff --git a/src/test/ui/const-generics/issues/issue-83765.rs b/src/test/ui/const-generics/issues/issue-83765.rs
deleted file mode 100644
index 71c164ab0..000000000
--- a/src/test/ui/const-generics/issues/issue-83765.rs
+++ /dev/null
@@ -1,116 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-trait TensorDimension {
- const DIM: usize;
- //~^ ERROR cycle detected when resolving instance
- // FIXME Given the current state of the compiler its expected that we cycle here,
- // but the cycle is still wrong.
- const ISSCALAR: bool = Self::DIM == 0;
- fn is_scalar(&self) -> bool {
- Self::ISSCALAR
- }
-}
-
-trait TensorSize: TensorDimension {
- fn size(&self) -> [usize; Self::DIM];
- fn inbounds(&self, index: [usize; Self::DIM]) -> bool {
- index.iter().zip(self.size().iter()).all(|(i, s)| i < s)
- }
-}
-
-trait Broadcastable: TensorSize + Sized {
- type Element;
- fn bget(&self, index: [usize; Self::DIM]) -> Option<Self::Element>;
- fn lazy_updim<const NEWDIM: usize>(
- &self,
- size: [usize; NEWDIM],
- ) -> LazyUpdim<Self, { Self::DIM }, NEWDIM> {
- assert!(
- NEWDIM >= Self::DIM,
- "Updimmed tensor cannot have fewer indices than the initial one."
- );
- LazyUpdim { size, reference: &self }
- }
- fn bmap<T, F: Fn(Self::Element) -> T>(&self, foo: F) -> BMap<T, Self, F, { Self::DIM }> {
- BMap { reference: self, closure: foo }
- }
-}
-
-struct LazyUpdim<'a, T: Broadcastable, const OLDDIM: usize, const DIM: usize> {
- size: [usize; DIM],
- reference: &'a T,
-}
-
-impl<'a, T: Broadcastable, const DIM: usize> TensorDimension for LazyUpdim<'a, T, { T::DIM }, DIM> {
- const DIM: usize = DIM;
-}
-
-impl<'a, T: Broadcastable, const DIM: usize> TensorSize for LazyUpdim<'a, T, { T::DIM }, DIM> {
- fn size(&self) -> [usize; DIM] {
- self.size
- }
-}
-
-impl<'a, T: Broadcastable, const DIM: usize> Broadcastable for LazyUpdim<'a, T, { T::DIM }, DIM> {
- type Element = T::Element;
- fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
- assert!(DIM >= T::DIM);
- if !self.inbounds(index) {
- return None;
- }
- let size = self.size();
- let newindex: [usize; T::DIM] = Default::default();
- self.reference.bget(newindex)
- }
-}
-
-struct BMap<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> {
- reference: &'a T,
- closure: F,
-}
-
-impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> TensorDimension
- for BMap<'a, R, T, F, DIM>
-{
- const DIM: usize = DIM;
-}
-impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> TensorSize
- for BMap<'a, R, T, F, DIM>
-{
- fn size(&self) -> [usize; DIM] {
- self.reference.size()
- }
-}
-
-impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> Broadcastable
- for BMap<'a, R, T, F, DIM>
-{
- type Element = R;
- fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
- self.reference.bget(index).map(&self.closure)
- }
-}
-
-impl<T> TensorDimension for Vec<T> {
- const DIM: usize = 1;
-}
-impl<T> TensorSize for Vec<T> {
- fn size(&self) -> [usize; 1] {
- [self.len()]
- }
-}
-impl<T: Clone> Broadcastable for Vec<T> {
- type Element = T;
- fn bget(&self, index: [usize; 1]) -> Option<T> {
- self.get(index[0]).cloned()
- }
-}
-
-fn main() {
- let v = vec![1, 2, 3];
- let bv = v.lazy_updim([3, 4]);
- let bbv = bv.bmap(|x| x * x);
-
- println!("The size of v is {:?}", bbv.bget([0, 2]).expect("Out of bounds."));
-}
diff --git a/src/test/ui/const-generics/issues/issue-83765.stderr b/src/test/ui/const-generics/issues/issue-83765.stderr
deleted file mode 100644
index d7b2b006c..000000000
--- a/src/test/ui/const-generics/issues/issue-83765.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0391]: cycle detected when resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`
- --> $DIR/issue-83765.rs:5:5
- |
-LL | const DIM: usize;
- | ^^^^^^^^^^^^^^^^
- |
-note: ...which requires computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`...
- --> $DIR/issue-83765.rs:4:1
- |
-LL | trait TensorDimension {
- | ^^^^^^^^^^^^^^^^^^^^^
- = note: ...which again requires resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`, completing the cycle
-note: cycle used when computing candidate for `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>`
- --> $DIR/issue-83765.rs:4:1
- |
-LL | trait TensorDimension {
- | ^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0391`.
diff --git a/src/test/ui/const-generics/issues/issue-83993.rs b/src/test/ui/const-generics/issues/issue-83993.rs
deleted file mode 100644
index f2f05d952..000000000
--- a/src/test/ui/const-generics/issues/issue-83993.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// check-pass
-
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-fn bug<'a>()
-where
- for<'b> [(); {
- let x: &'b ();
- 0
- }]:
-{}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-84659.rs b/src/test/ui/const-generics/issues/issue-84659.rs
deleted file mode 100644
index 440ca740a..000000000
--- a/src/test/ui/const-generics/issues/issue-84659.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(generic_const_exprs)]
-
-trait Bar<const N: usize> {}
-
-trait Foo<'a> {
- const N: usize;
- type Baz: Bar<{ Self::N }>;
- //~^ ERROR: unconstrained generic constant
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-84659.stderr b/src/test/ui/const-generics/issues/issue-84659.stderr
deleted file mode 100644
index 2dfc48a34..000000000
--- a/src/test/ui/const-generics/issues/issue-84659.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: unconstrained generic constant
- --> $DIR/issue-84659.rs:8:15
- |
-LL | type Baz: Bar<{ Self::N }>;
- | ^^^^^^^^^^^^^^^^
- |
- = help: try adding a `where` bound using this expression: `where [(); { Self::N }]:`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-85031-2.rs b/src/test/ui/const-generics/issues/issue-85031-2.rs
deleted file mode 100644
index 4908fb296..000000000
--- a/src/test/ui/const-generics/issues/issue-85031-2.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// check-pass
-// known-bug
-
-// This should not compile, as the compiler should not know
-// `A - 0` is satisfied `?x - 0` if `?x` is inferred to `A`.
-#![allow(incomplete_features)]
-#![feature(generic_const_exprs)]
-
-pub struct Ref<'a>(&'a i32);
-
-impl<'a> Ref<'a> {
- pub fn foo<const A: usize>() -> [(); A - 0] {
- //~^ WARN function cannot
- Self::foo()
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-85031-2.stderr b/src/test/ui/const-generics/issues/issue-85031-2.stderr
deleted file mode 100644
index fc6905768..000000000
--- a/src/test/ui/const-generics/issues/issue-85031-2.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-warning: function cannot return without recursing
- --> $DIR/issue-85031-2.rs:12:5
- |
-LL | pub fn foo<const A: usize>() -> [(); A - 0] {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
-LL |
-LL | Self::foo()
- | ----------- recursive call site
- |
- = help: a `loop` may express intention better if this is on purpose
- = note: `#[warn(unconditional_recursion)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/const-generics/issues/issue-86033.rs b/src/test/ui/const-generics/issues/issue-86033.rs
deleted file mode 100644
index cf08f722f..000000000
--- a/src/test/ui/const-generics/issues/issue-86033.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// check-pass
-
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub trait IsTrue<const T: bool> {}
-impl IsTrue<true> for () {}
-
-pub trait IsZST {}
-
-impl<T> IsZST for T
-where
- (): IsTrue<{ std::mem::size_of::<T>() == 0 }>
-{}
-
-fn _func() -> impl IsZST {
- || {}
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-86530.rs b/src/test/ui/const-generics/issues/issue-86530.rs
deleted file mode 100644
index b024decd4..000000000
--- a/src/test/ui/const-generics/issues/issue-86530.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub trait X {
- const Y: usize;
-}
-
-fn z<T>(t: T)
-where
- T: X,
- [(); T::Y]: ,
-{
-}
-
-fn unit_literals() {
- z(" ");
- //~^ ERROR: the trait bound `&str: X` is not satisfied
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-86530.stderr b/src/test/ui/const-generics/issues/issue-86530.stderr
deleted file mode 100644
index c63857b23..000000000
--- a/src/test/ui/const-generics/issues/issue-86530.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0277]: the trait bound `&str: X` is not satisfied
- --> $DIR/issue-86530.rs:16:7
- |
-LL | z(" ");
- | - ^^^ the trait `X` is not implemented for `&str`
- | |
- | required by a bound introduced by this call
- |
-note: required by a bound in `z`
- --> $DIR/issue-86530.rs:10:8
- |
-LL | fn z<T>(t: T)
- | - required by a bound in this
-LL | where
-LL | T: X,
- | ^ required by this bound in `z`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/issues/issue-86535-2.rs b/src/test/ui/const-generics/issues/issue-86535-2.rs
deleted file mode 100644
index 0b535fd66..000000000
--- a/src/test/ui/const-generics/issues/issue-86535-2.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// run-pass
-#![feature(adt_const_params, generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub trait Foo {
- const ASSOC_C: usize;
- fn foo() where [(); Self::ASSOC_C]:;
-}
-
-struct Bar<const N: &'static ()>;
-impl<const N: &'static ()> Foo for Bar<N> {
- const ASSOC_C: usize = 3;
-
- fn foo() where [u8; Self::ASSOC_C]: {
- let _: [u8; Self::ASSOC_C] = loop {};
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-86535.rs b/src/test/ui/const-generics/issues/issue-86535.rs
deleted file mode 100644
index 5289c4e99..000000000
--- a/src/test/ui/const-generics/issues/issue-86535.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// run-pass
-#![feature(adt_const_params, generic_const_exprs)]
-#![allow(incomplete_features, unused_variables)]
-
-struct F<const S: &'static str>;
-impl<const S: &'static str> X for F<{ S }> {
- const W: usize = 3;
-
- fn d(r: &[u8; Self::W]) -> F<{ S }> {
- let x: [u8; Self::W] = [0; Self::W];
- F
- }
-}
-
-pub trait X {
- const W: usize;
- fn d(r: &[u8; Self::W]) -> Self;
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-86820.rs b/src/test/ui/const-generics/issues/issue-86820.rs
deleted file mode 100644
index ae4bd943f..000000000
--- a/src/test/ui/const-generics/issues/issue-86820.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Regression test for the ICE described in #86820.
-
-#![allow(unused, dead_code)]
-use std::ops::BitAnd;
-
-const C: fn() = || is_set();
-fn is_set() {
- 0xffu8.bit::<0>();
-}
-
-trait Bits {
- fn bit<const I: u8>(self) -> bool;
-}
-
-impl Bits for u8 {
- fn bit<const I: usize>(self) -> bool {
- //~^ ERROR: method `bit` has an incompatible generic parameter for trait `Bits` [E0053]
- let i = 1 << I;
- let mask = u8::from(i);
- mask & self == mask
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-86820.stderr b/src/test/ui/const-generics/issues/issue-86820.stderr
deleted file mode 100644
index 3a9cd957f..000000000
--- a/src/test/ui/const-generics/issues/issue-86820.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0053]: method `bit` has an incompatible generic parameter for trait `Bits`
- --> $DIR/issue-86820.rs:16:12
- |
-LL | trait Bits {
- | ----
-LL | fn bit<const I: u8>(self) -> bool;
- | ----------- expected const parameter of type `u8`
-...
-LL | impl Bits for u8 {
- | ----------------
-LL | fn bit<const I: usize>(self) -> bool {
- | ^^^^^^^^^^^^^^ found const parameter of type `usize`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0053`.
diff --git a/src/test/ui/const-generics/issues/issue-87076.rs b/src/test/ui/const-generics/issues/issue-87076.rs
deleted file mode 100644
index 8a567678b..000000000
--- a/src/test/ui/const-generics/issues/issue-87076.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// build-pass
-
-#![feature(adt_const_params)]
-#![allow(incomplete_features)]
-
-#[derive(PartialEq, Eq)]
-pub struct UnitDims {
- pub time: u8,
- pub length: u8,
-}
-
-pub struct UnitValue<const DIMS: UnitDims>;
-
-impl<const DIMS: UnitDims> UnitValue<DIMS> {
- fn crash() {}
-}
-
-fn main() {
- UnitValue::<{ UnitDims { time: 1, length: 2 } }>::crash();
-}
diff --git a/src/test/ui/const-generics/issues/issue-87470.rs b/src/test/ui/const-generics/issues/issue-87470.rs
deleted file mode 100644
index d60181a41..000000000
--- a/src/test/ui/const-generics/issues/issue-87470.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// build-pass
-
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub trait TraitWithConst {
- const SOME_CONST: usize;
-}
-
-pub trait OtherTrait: TraitWithConst {
- fn some_fn(self) -> [u8 ; <Self as TraitWithConst>::SOME_CONST];
-}
-
-impl TraitWithConst for f32 {
- const SOME_CONST: usize = 32;
-}
-
-impl OtherTrait for f32 {
- fn some_fn(self) -> [u8 ; <Self as TraitWithConst>::SOME_CONST] {
- [0; 32]
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-87493.rs b/src/test/ui/const-generics/issues/issue-87493.rs
deleted file mode 100644
index d8599ab22..000000000
--- a/src/test/ui/const-generics/issues/issue-87493.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-pub trait MyTrait {
- type Assoc;
-}
-
-pub fn foo<S, T>(_s: S, _t: T)
-where
- S: MyTrait,
- T: MyTrait<Assoc == S::Assoc>,
- //~^ ERROR: expected one of `,` or `>`, found `==`
- //~| ERROR: this trait takes 0 generic arguments but 1 generic argument was supplied
-{
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-87493.stderr b/src/test/ui/const-generics/issues/issue-87493.stderr
deleted file mode 100644
index 653afae21..000000000
--- a/src/test/ui/const-generics/issues/issue-87493.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error: expected one of `,` or `>`, found `==`
- --> $DIR/issue-87493.rs:8:22
- |
-LL | T: MyTrait<Assoc == S::Assoc>,
- | ^^ expected one of `,` or `>`
- |
-help: if you meant to use an associated type binding, replace `==` with `=`
- |
-LL | T: MyTrait<Assoc = S::Assoc>,
- | ~
-
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
- --> $DIR/issue-87493.rs:8:8
- |
-LL | T: MyTrait<Assoc == S::Assoc>,
- | ^^^^^^^ expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $DIR/issue-87493.rs:1:11
- |
-LL | pub trait MyTrait {
- | ^^^^^^^
-help: replace the generic bound with the associated type
- |
-LL | T: MyTrait<Assoc = Assoc == S::Assoc>,
- | +++++++
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0107`.
diff --git a/src/test/ui/const-generics/issues/issue-87964.rs b/src/test/ui/const-generics/issues/issue-87964.rs
deleted file mode 100644
index 116686abb..000000000
--- a/src/test/ui/const-generics/issues/issue-87964.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// build-pass
-
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub trait Target {
- const LENGTH: usize;
-}
-
-
-pub struct Container<T: Target>
-where
- [(); T::LENGTH]: Sized,
-{
- _target: T,
-}
-
-impl<T: Target> Container<T>
-where
- [(); T::LENGTH]: Sized,
-{
- pub fn start(
- _target: T,
- ) -> Container<T> {
- Container { _target }
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-88119.rs b/src/test/ui/const-generics/issues/issue-88119.rs
deleted file mode 100644
index 647b0eea8..000000000
--- a/src/test/ui/const-generics/issues/issue-88119.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// check-pass
-
-#![allow(incomplete_features)]
-#![feature(const_trait_impl, generic_const_exprs)]
-
-#[const_trait]
-trait ConstName {
- const NAME_BYTES: &'static [u8];
-}
-
-impl const ConstName for u8 {
- const NAME_BYTES: &'static [u8] = b"u8";
-}
-
-const fn name_len<T: ?Sized + ConstName>() -> usize {
- T::NAME_BYTES.len()
-}
-
-impl<T: ?Sized + ConstName> const ConstName for &T
-where
- [(); name_len::<T>()]:,
-{
- const NAME_BYTES: &'static [u8] = b"&T";
-}
-
-impl<T: ?Sized + ConstName> const ConstName for &mut T
-where
- [(); name_len::<T>()]:,
-{
- const NAME_BYTES: &'static [u8] = b"&mut T";
-}
-
-pub const ICE_1: &'static [u8] = <&&mut u8 as ConstName>::NAME_BYTES;
-pub const ICE_2: &'static [u8] = <&mut &u8 as ConstName>::NAME_BYTES;
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-88468.rs b/src/test/ui/const-generics/issues/issue-88468.rs
deleted file mode 100644
index 914047236..000000000
--- a/src/test/ui/const-generics/issues/issue-88468.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// check-pass
-
-#![allow(incomplete_features)]
-#![feature(generic_const_exprs)]
-
-pub struct Assert<const COND: bool>();
-pub trait IsTrue {}
-impl IsTrue for Assert<true> {}
-
-pub trait IsNotZST {}
-impl<T> IsNotZST for T where Assert<{ std::mem::size_of::<T>() > 0 }>: IsTrue {}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-88997.rs b/src/test/ui/const-generics/issues/issue-88997.rs
deleted file mode 100644
index 7666a5141..000000000
--- a/src/test/ui/const-generics/issues/issue-88997.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(generic_const_exprs)]
-
-struct ConstAssert<const COND: bool>;
-trait True {}
-impl True for ConstAssert<true> {}
-
-struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
-//~^ ERROR the type of const parameters must not depend on other generic parameters
-//~| ERROR the type of const parameters must not depend on other generic parameters
-where
- ConstAssert<{ MIN <= MAX }>: True;
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-88997.stderr b/src/test/ui/const-generics/issues/issue-88997.stderr
deleted file mode 100644
index 505ba0da2..000000000
--- a/src/test/ui/const-generics/issues/issue-88997.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-88997.rs:8:40
- |
-LL | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
- | ^ the type must not depend on the parameter `T`
-
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-88997.rs:8:54
- |
-LL | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
- | ^ the type must not depend on the parameter `T`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0770`.
diff --git a/src/test/ui/const-generics/issues/issue-89146.rs b/src/test/ui/const-generics/issues/issue-89146.rs
deleted file mode 100644
index e3540f46f..000000000
--- a/src/test/ui/const-generics/issues/issue-89146.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// build-pass
-
-#![allow(incomplete_features)]
-#![feature(generic_const_exprs)]
-
-pub trait Foo {
- const SIZE: usize;
-
- fn to_bytes(&self) -> [u8; Self::SIZE];
-}
-
-pub fn bar<G: Foo>(a: &G) -> u8
-where
- [(); G::SIZE]: Sized,
-{
- deeper_bar(a)
-}
-
-fn deeper_bar<G: Foo>(a: &G) -> u8
-where
- [(); G::SIZE]: Sized,
-{
- a.to_bytes()[0]
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-89304.rs b/src/test/ui/const-generics/issues/issue-89304.rs
deleted file mode 100644
index d544d637c..000000000
--- a/src/test/ui/const-generics/issues/issue-89304.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// check-pass
-
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-struct GenericStruct<const T: usize> { val: i64 }
-
-impl<const T: usize> From<GenericStruct<T>> for GenericStruct<{T + 1}> {
- fn from(other: GenericStruct<T>) -> Self {
- Self { val: other.val }
- }
-}
-
-impl<const T: usize> From<GenericStruct<{T + 1}>> for GenericStruct<T> {
- fn from(other: GenericStruct<{T + 1}>) -> Self {
- Self { val: other.val }
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-89320.rs b/src/test/ui/const-generics/issues/issue-89320.rs
deleted file mode 100644
index afa5c8fab..000000000
--- a/src/test/ui/const-generics/issues/issue-89320.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// build-pass
-
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub trait Enumerable {
- const N: usize;
-}
-
-#[derive(Clone)]
-pub struct SymmetricGroup<S>
-where
- S: Enumerable,
- [(); S::N]: Sized,
-{
- _phantom: std::marker::PhantomData<S>,
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-89334.rs b/src/test/ui/const-generics/issues/issue-89334.rs
deleted file mode 100644
index b15b7428c..000000000
--- a/src/test/ui/const-generics/issues/issue-89334.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// build-pass
-
-#![feature(generic_const_exprs)]
-#![allow(unused_braces, incomplete_features)]
-
-pub trait AnotherTrait{
- const ARRAY_SIZE: usize;
-}
-pub trait Shard<T: AnotherTrait>:
- AsMut<[[u8; T::ARRAY_SIZE]]>
-where
- [(); T::ARRAY_SIZE]: Sized
-{
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-90318.rs b/src/test/ui/const-generics/issues/issue-90318.rs
deleted file mode 100644
index d6c48e63b..000000000
--- a/src/test/ui/const-generics/issues/issue-90318.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-#![feature(const_type_id)]
-#![feature(generic_const_exprs)]
-#![feature(core_intrinsics)]
-#![allow(incomplete_features)]
-
-use std::any::TypeId;
-
-struct If<const B: bool>;
-pub trait True {}
-impl True for If<true> {}
-
-fn consume<T: 'static>(_val: T)
-where
- If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
- //~^ ERROR: can't compare
-{
-}
-
-fn test<T: 'static>()
-where
- If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
- //~^ ERROR: can't compare
-{
-}
-
-fn main() {
- let a = ();
- consume(0i32);
- consume(a);
-}
diff --git a/src/test/ui/const-generics/issues/issue-90318.stderr b/src/test/ui/const-generics/issues/issue-90318.stderr
deleted file mode 100644
index aba4b5c1a..000000000
--- a/src/test/ui/const-generics/issues/issue-90318.stderr
+++ /dev/null
@@ -1,29 +0,0 @@
-error[E0277]: can't compare `TypeId` with `_` in const contexts
- --> $DIR/issue-90318.rs:14:28
- |
-LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
- | ^^ no implementation for `TypeId == _`
- |
- = help: the trait `~const PartialEq<_>` is not implemented for `TypeId`
-note: the trait `PartialEq<_>` is implemented for `TypeId`, but that implementation is not `const`
- --> $DIR/issue-90318.rs:14:28
- |
-LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
- | ^^
-
-error[E0277]: can't compare `TypeId` with `_` in const contexts
- --> $DIR/issue-90318.rs:21:28
- |
-LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
- | ^^ no implementation for `TypeId == _`
- |
- = help: the trait `~const PartialEq<_>` is not implemented for `TypeId`
-note: the trait `PartialEq<_>` is implemented for `TypeId`, but that implementation is not `const`
- --> $DIR/issue-90318.rs:21:28
- |
-LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
- | ^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/issues/issue-90364.rs b/src/test/ui/const-generics/issues/issue-90364.rs
deleted file mode 100644
index b11b07b50..000000000
--- a/src/test/ui/const-generics/issues/issue-90364.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub struct Foo<T, const H: T>(T)
-//~^ ERROR the type of const parameters must not depend on other generic parameters
-where
- [(); 1]:;
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-90364.stderr b/src/test/ui/const-generics/issues/issue-90364.stderr
deleted file mode 100644
index e85bd136e..000000000
--- a/src/test/ui/const-generics/issues/issue-90364.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/issue-90364.rs:4:28
- |
-LL | pub struct Foo<T, const H: T>(T)
- | ^ the type must not depend on the parameter `T`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0770`.
diff --git a/src/test/ui/const-generics/issues/issue-90455.rs b/src/test/ui/const-generics/issues/issue-90455.rs
deleted file mode 100644
index a580410cf..000000000
--- a/src/test/ui/const-generics/issues/issue-90455.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-#![feature(generic_const_exprs, adt_const_params)]
-#![allow(incomplete_features)]
-
-struct FieldElement<const N: &'static str> {
- n: [u64; num_limbs(N)],
- //~^ ERROR unconstrained generic constant
-}
-const fn num_limbs(_: &str) -> usize {
- 0
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-90455.stderr b/src/test/ui/const-generics/issues/issue-90455.stderr
deleted file mode 100644
index 724d7f42e..000000000
--- a/src/test/ui/const-generics/issues/issue-90455.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: unconstrained generic constant
- --> $DIR/issue-90455.rs:5:8
- |
-LL | n: [u64; num_limbs(N)],
- | ^^^^^^^^^^^^^^^^^^^
- |
- = help: try adding a `where` bound using this expression: `where [(); num_limbs(N)]:`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/const-generics/issues/issue-92186.rs b/src/test/ui/const-generics/issues/issue-92186.rs
deleted file mode 100644
index 9ced4667d..000000000
--- a/src/test/ui/const-generics/issues/issue-92186.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// check-pass
-
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-pub struct Foo<const N: usize>;
-pub trait Bar<T> {}
-
-impl<T> Bar<T> for Foo<{ 1 }> {}
-impl<T> Bar<T> for Foo<{ 2 }> {}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-96654.rs b/src/test/ui/const-generics/issues/issue-96654.rs
deleted file mode 100644
index 8cf786dbe..000000000
--- a/src/test/ui/const-generics/issues/issue-96654.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// check-pass
-
-struct A<const M: u32> {}
-
-struct B<const M: u32> {}
-
-impl<const M: u32> B<M> {
- const M: u32 = M;
-}
-
-struct C<const M: u32> {
- a: A<{ B::<1>::M }>,
-}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-97278.rs b/src/test/ui/const-generics/issues/issue-97278.rs
deleted file mode 100644
index da0a9776f..000000000
--- a/src/test/ui/const-generics/issues/issue-97278.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![feature(adt_const_params)]
-#![allow(incomplete_features)]
-
-use std::sync::Arc;
-
-#[derive(PartialEq, Eq)]
-enum Bar {
- Bar(Arc<i32>)
-}
-
-fn test<const BAR: Bar>() {}
-//~^ ERROR `Arc<i32>` must be annotated with `#[derive(PartialEq, Eq)]`
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-97278.stderr b/src/test/ui/const-generics/issues/issue-97278.stderr
deleted file mode 100644
index ff13cb505..000000000
--- a/src/test/ui/const-generics/issues/issue-97278.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0741]: `Arc<i32>` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter
- --> $DIR/issue-97278.rs:11:20
- |
-LL | fn test<const BAR: Bar>() {}
- | ^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0741`.
diff --git a/src/test/ui/const-generics/issues/issue-97634.rs b/src/test/ui/const-generics/issues/issue-97634.rs
deleted file mode 100644
index 422e8de68..000000000
--- a/src/test/ui/const-generics/issues/issue-97634.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// build-pass
-
-pub enum Register<const N: u16> {
- Field0 = 40,
- Field1,
-}
-
-fn main() {
- let _b = Register::<0>::Field1 as u16;
-}
diff --git a/src/test/ui/const-generics/issues/issue-98629.rs b/src/test/ui/const-generics/issues/issue-98629.rs
deleted file mode 100644
index 1d2d3012a..000000000
--- a/src/test/ui/const-generics/issues/issue-98629.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![feature(const_trait_impl)]
-
-#[const_trait]
-trait Trait {
- const N: usize;
-}
-
-impl const Trait for i32 {}
-//~^ ERROR not all trait items implemented, missing: `N`
-
-fn f()
-where
- [(); <i32 as Trait>::N]:,
-{}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-98629.stderr b/src/test/ui/const-generics/issues/issue-98629.stderr
deleted file mode 100644
index 4a248be76..000000000
--- a/src/test/ui/const-generics/issues/issue-98629.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0046]: not all trait items implemented, missing: `N`
- --> $DIR/issue-98629.rs:8:1
- |
-LL | const N: usize;
- | -------------- `N` from trait
-...
-LL | impl const Trait for i32 {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^ missing `N` in implementation
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0046`.
diff --git a/src/test/ui/const-generics/issues/issue-99641.rs b/src/test/ui/const-generics/issues/issue-99641.rs
deleted file mode 100644
index fae6d3fc4..000000000
--- a/src/test/ui/const-generics/issues/issue-99641.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-#![feature(adt_const_params)]
-#![allow(incomplete_features)]
-
-fn main() {
- pub struct Color<const WHITE: (fn(),)>;
- //~^ ERROR using function pointers
-
- impl<const WHITE: (fn(),)> Color<WHITE> {
- //~^ ERROR using function pointers
- pub fn new() -> Self {
- Color::<WHITE>
- }
- }
-
- pub const D65: (fn(),) = (|| {},);
-
- Color::<D65>::new();
-}
diff --git a/src/test/ui/const-generics/issues/issue-99641.stderr b/src/test/ui/const-generics/issues/issue-99641.stderr
deleted file mode 100644
index 349ebba08..000000000
--- a/src/test/ui/const-generics/issues/issue-99641.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0741]: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-99641.rs:5:35
- |
-LL | pub struct Color<const WHITE: (fn(),)>;
- | ^^^^^^^
-
-error[E0741]: using function pointers as const generic parameters is forbidden
- --> $DIR/issue-99641.rs:8:23
- |
-LL | impl<const WHITE: (fn(),)> Color<WHITE> {
- | ^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0741`.