]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-68366.min.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-68366.min.stderr
1 error: generic parameters may not be used in const operations
2 --> $DIR/issue-68366.rs:11:37
3 |
4 LL | impl <const N: usize> Collatz<{Some(N)}> {}
5 | ^ cannot perform const operation using `N`
6 |
7 = help: const parameters may only be used as standalone arguments, i.e. `N`
8 = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
9
10 error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
11 --> $DIR/issue-68366.rs:11:13
12 |
13 LL | impl <const N: usize> Collatz<{Some(N)}> {}
14 | ^ unconstrained const parameter
15 |
16 = note: expressions using a const parameter must map each value to a distinct output value
17 = note: proving the result of expressions other than the parameter are unique is not supported
18
19 error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
20 --> $DIR/issue-68366.rs:17:12
21 |
22 LL | impl<const N: usize> Foo {}
23 | ^ unconstrained const parameter
24 |
25 = note: expressions using a const parameter must map each value to a distinct output value
26 = note: proving the result of expressions other than the parameter are unique is not supported
27
28 error: aborting due to 3 previous errors
29
30 For more information about this error, try `rustc --explain E0207`.