This commit is contained in:
Bastian Kauschke 2020-09-21 23:25:52 +02:00
parent 9a493ced74
commit 2f893e458a
4 changed files with 23 additions and 31 deletions

View file

@ -2,13 +2,10 @@ error: overly complex generic constant
--> $DIR/closures.rs:3:35
|
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {}
| ^^^^^^^^^^^^^
| ^^^^-------^^
| |
| unsupported rvalue
|
note: unsupported rvalue
--> $DIR/closures.rs:3:39
|
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {}
| ^^^^^^^
= help: consider moving this anonymous constant into a `const` function
error: aborting due to previous error

View file

@ -2,26 +2,20 @@ error: overly complex generic constant
--> $DIR/let-bindings.rs:6:68
|
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
| ^^^^^^^^^^^^^^^^^^^^
| ^^^^^^-^^^^^^^^^^^^^
| |
| unsupported statement
|
note: unsupported statement
--> $DIR/let-bindings.rs:6:74
|
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
| ^
= help: consider moving this anonymous constant into a `const` function
error: overly complex generic constant
--> $DIR/let-bindings.rs:6:35
|
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
| ^^^^^^^^^^^^^^^^^^^^
| ^^^^^^-^^^^^^^^^^^^^
| |
| unsupported statement
|
note: unsupported statement
--> $DIR/let-bindings.rs:6:41
|
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
| ^
= help: consider moving this anonymous constant into a `const` function
error: aborting due to 2 previous errors