Skip to content

Commit ad7f330

Browse files
committed
Add test default_function_param
1 parent 601c13c commit ad7f330

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#![feature(min_const_generics)]
2+
3+
fn foo<const SIZE: usize = 5>() {}
4+
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
5+
6+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
2+
--> $DIR/default_function_param.rs:3:26
3+
|
4+
LL | fn foo<const SIZE: usize = 5>() {}
5+
| ^ expected one of 7 possible tokens
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)