This commit is contained in:
Bastian Kauschke 2020-10-23 15:04:12 +02:00
parent 6ad140ca19
commit 47cb871f14
2 changed files with 45 additions and 35 deletions

View file

@ -2,7 +2,9 @@ error: overly complex generic constant
--> $DIR/unused_expr.rs:4:34
|
LL | fn add<const N: usize>() -> [u8; { N + 1; 5 }] {
| ^^^^^^^^^^^^ unused node
| ^^-----^^^^^
| |
| dead code
|
= help: consider moving this anonymous constant into a `const` function
@ -10,7 +12,9 @@ error: overly complex generic constant
--> $DIR/unused_expr.rs:9:34
|
LL | fn div<const N: usize>() -> [u8; { N / 1; 5 }] {
| ^^^^^^^^^^^^ unused node
| ^^-----^^^^^
| |
| dead code
|
= help: consider moving this anonymous constant into a `const` function
@ -18,7 +22,9 @@ error: overly complex generic constant
--> $DIR/unused_expr.rs:16:38
|
LL | fn fn_call<const N: usize>() -> [u8; { foo(N); 5 }] {
| ^^^^^^^^^^^^^ unused node
| ^^------^^^^^
| |
| dead code
|
= help: consider moving this anonymous constant into a `const` function