Add test default_function_param
This commit is contained in:
parent
601c13c6fd
commit
ad7f330f52
2 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
||||||
|
#![feature(min_const_generics)]
|
||||||
|
|
||||||
|
fn foo<const SIZE: usize = 5>() {}
|
||||||
|
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
|
||||||
|
|
||||||
|
fn main() {}
|
|
@ -0,0 +1,8 @@
|
||||||
|
error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
|
||||||
|
--> $DIR/default_function_param.rs:3:26
|
||||||
|
|
|
||||||
|
LL | fn foo<const SIZE: usize = 5>() {}
|
||||||
|
| ^ expected one of 7 possible tokens
|
||||||
|
|
||||||
|
error: aborting due to previous error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue