]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issues/issue-68366.min.stderr
Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc
[rust.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:7
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:6
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`.