This commit is contained in:
Ellen 2021-05-13 14:00:04 +01:00
parent 7e952ec039
commit aec611c08d
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
error[E0080]: evaluation of constant value failed
--> $DIR/default-param-wf-concrete.rs:3:28
--> $DIR/default-param-wf-concrete.rs:2:28
|
LL | struct Foo<const N: u8 = { 255 + 1 }>;
| ^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow

View File

@ -1,5 +1,5 @@
error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
--> $DIR/default_function_param.rs:5:14
--> $DIR/default_function_param.rs:4:14
|
LL | fn foo<const SIZE: usize = 5usize>() {}
| ^^^^