Add test default_function_param

This commit is contained in:
Ethan Brierley 2020-11-11 22:48:52 +00:00
parent 601c13c6fd
commit ad7f330f52
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#![feature(min_const_generics)]
fn foo<const SIZE: usize = 5>() {}
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
fn main() {}

View File

@ -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