diff --git a/tests/crashes/129209.rs b/tests/crashes/129209.rs deleted file mode 100644 index 249fa41552eb..000000000000 --- a/tests/crashes/129209.rs +++ /dev/null @@ -1,11 +0,0 @@ -//@ known-bug: rust-lang/rust#129209 - -impl< - const N: usize = { - static || { - Foo([0; X]); - } - }, - > PartialEq for True -{ -} diff --git a/tests/crashes/131295.rs b/tests/crashes/131295.rs deleted file mode 100644 index f31d6bc324a2..000000000000 --- a/tests/crashes/131295.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ known-bug: #131295 - -#![feature(generic_const_exprs)] - -async fn foo<'a>() -> [(); { - let _y: &'a (); - 4 - }] { -} diff --git a/tests/crashes/139738.rs b/tests/crashes/139738.rs deleted file mode 100644 index c0e7307de6c3..000000000000 --- a/tests/crashes/139738.rs +++ /dev/null @@ -1,3 +0,0 @@ -//@ known-bug: #139738 -#![feature(generic_const_exprs)] -fn b<'a>() -> impl IntoIterator<[(); (|_: &'a u8| 0, 0).1]> {} diff --git a/tests/ui/const-generics/parent_generics_of_nested_in_default.rs b/tests/ui/const-generics/parent_generics_of_nested_in_default.rs new file mode 100644 index 000000000000..25dc416fc1fd --- /dev/null +++ b/tests/ui/const-generics/parent_generics_of_nested_in_default.rs @@ -0,0 +1,6 @@ +impl Tr {} +//~^ ERROR cannot find type `Tr` +//~| ERROR cannot find value `B` +//~| ERROR defaults for generic parameters are not allowed here + +fn main() {} diff --git a/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr b/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr new file mode 100644 index 000000000000..24e05482a1a9 --- /dev/null +++ b/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr @@ -0,0 +1,24 @@ +error[E0412]: cannot find type `Tr` in this scope + --> $DIR/parent_generics_of_nested_in_default.rs:1:36 + | +LL | impl Tr {} + | ^^ not found in this scope + +error[E0425]: cannot find value `B` in this scope + --> $DIR/parent_generics_of_nested_in_default.rs:1:30 + | +LL | impl Tr {} + | - ^ help: a const parameter with a similar name exists: `A` + | | + | similarly named const parameter `A` defined here + +error: defaults for generic parameters are not allowed here + --> $DIR/parent_generics_of_nested_in_default.rs:1:6 + | +LL | impl Tr {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0412, E0425. +For more information about an error, try `rustc --explain E0412`.