update min_const_generics tests using default values for const params

The `const_generics_defaults` now handles them, and they correctly parse, so we can update these tests expecting a parser error .
This commit is contained in:
Rémy Rakic 2020-12-31 02:04:52 +01:00
parent 64244b2201
commit 907ba75eb0
4 changed files with 12 additions and 8 deletions

View file

@ -1,4 +1,4 @@
fn foo<const SIZE: usize = 5>() {}
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
//~^ ERROR default values for const generic parameters are unstable
fn main() {}

View file

@ -1,8 +1,10 @@
error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
--> $DIR/default_function_param.rs:1:26
error: default values for const generic parameters are unstable
--> $DIR/default_function_param.rs:1:28
|
LL | fn foo<const SIZE: usize = 5>() {}
| ^ expected one of 7 possible tokens
| ^
|
= help: add `#![feature(const_generics_defaults)]` to the crate attributes to enable
error: aborting due to previous error

View file

@ -1,4 +1,4 @@
trait Foo<const KIND: bool = true> {}
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
//~^ ERROR default values for const generic parameters are unstable
fn main() {}

View file

@ -1,8 +1,10 @@
error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
--> $DIR/default_trait_param.rs:1:28
error: default values for const generic parameters are unstable
--> $DIR/default_trait_param.rs:1:30
|
LL | trait Foo<const KIND: bool = true> {}
| ^ expected one of 7 possible tokens
| ^^^^
|
= help: add `#![feature(const_generics_defaults)]` to the crate attributes to enable
error: aborting due to previous error