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:
parent
64244b2201
commit
907ba75eb0
@ -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() {}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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() {}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user