mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-09 05:23:07 +00:00
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>() {}
|
fn foo<const SIZE: usize = 5>() {}
|
||||||
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
|
//~^ ERROR default values for const generic parameters are unstable
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
|
error: default values for const generic parameters are unstable
|
||||||
--> $DIR/default_function_param.rs:1:26
|
--> $DIR/default_function_param.rs:1:28
|
||||||
|
|
|
|
||||||
LL | fn foo<const SIZE: usize = 5>() {}
|
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
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
trait Foo<const KIND: bool = true> {}
|
trait Foo<const KIND: bool = true> {}
|
||||||
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
|
//~^ ERROR default values for const generic parameters are unstable
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
|
error: default values for const generic parameters are unstable
|
||||||
--> $DIR/default_trait_param.rs:1:28
|
--> $DIR/default_trait_param.rs:1:30
|
||||||
|
|
|
|
||||||
LL | trait Foo<const KIND: bool = true> {}
|
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
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user