]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/unused_expr.stderr
Rollup merge of #106886 - dtolnay:fastinstall, r=Mark-Simulacrum
[rust.git] / tests / ui / const-generics / generic_const_exprs / unused_expr.stderr
1 error: overly complex generic constant
2   --> $DIR/unused_expr.rs:4:34
3    |
4 LL | fn add<const N: usize>() -> [u8; { N + 1; 5 }] {
5    |                                  ^^^^^^^^^^^^ blocks are not supported in generic constants
6    |
7    = help: consider moving this anonymous constant into a `const` function
8    = note: this operation may be supported in the future
9
10 error: overly complex generic constant
11   --> $DIR/unused_expr.rs:9:34
12    |
13 LL | fn div<const N: usize>() -> [u8; { N / 1; 5 }] {
14    |                                  ^^^^^^^^^^^^ blocks are not supported in generic constants
15    |
16    = help: consider moving this anonymous constant into a `const` function
17    = note: this operation may be supported in the future
18
19 error: overly complex generic constant
20   --> $DIR/unused_expr.rs:16:38
21    |
22 LL | fn fn_call<const N: usize>() -> [u8; { foo(N); 5 }] {
23    |                                      ^^^^^^^^^^^^^ blocks are not supported in generic constants
24    |
25    = help: consider moving this anonymous constant into a `const` function
26    = note: this operation may be supported in the future
27
28 error: aborting due to 3 previous errors
29