diff --git a/src/test/ui/const-generics/min_const_generics/default_function_param.rs b/src/test/ui/const-generics/min_const_generics/default_function_param.rs new file mode 100644 index 00000000000..7e0c1c2ed9f --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/default_function_param.rs @@ -0,0 +1,6 @@ +#![feature(min_const_generics)] + +fn foo() {} + //~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` + +fn main() {} diff --git a/src/test/ui/const-generics/min_const_generics/default_function_param.stderr b/src/test/ui/const-generics/min_const_generics/default_function_param.stderr new file mode 100644 index 00000000000..ed1a83b6a4d --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/default_function_param.stderr @@ -0,0 +1,8 @@ +error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` + --> $DIR/default_function_param.rs:3:26 + | +LL | fn foo() {} + | ^ expected one of 7 possible tokens + +error: aborting due to previous error + diff --git a/src/test/ui/const-generics/min_const_generics/default_trait_param.rs b/src/test/ui/const-generics/min_const_generics/default_trait_param.rs new file mode 100644 index 00000000000..322ddccbf18 --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/default_trait_param.rs @@ -0,0 +1,6 @@ +#![feature(min_const_generics)] + +trait Foo {} + //~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` + +fn main() {} diff --git a/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr b/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr new file mode 100644 index 00000000000..49c3ac86744 --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr @@ -0,0 +1,8 @@ +error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` + --> $DIR/default_trait_param.rs:3:28 + | +LL | trait Foo {} + | ^ expected one of 7 possible tokens + +error: aborting due to previous error +