blob: 78bf85e9c6deebd2fda38d9cc9a7178fd1a0adf6 [file] [log] [blame]
Deadbeefebf50282022-10-20 19:32:161error: `~const` is not allowed here
Raekye884af362023-09-27 21:25:312 --> $DIR/tilde-const-and-const-params.rs:9:15
3 |
4LL | fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> {
Deadbeef16040a12023-11-24 14:32:055 | ^^^^^^
Raekye884af362023-09-27 21:25:316 |
7note: this function is not `const`, so it cannot have `~const` trait bounds
8 --> $DIR/tilde-const-and-const-params.rs:9:8
9 |
10LL | fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> {
11 | ^^^
12
13error: `~const` is not allowed here
Michael Goulet8b7b8e52024-10-22 03:22:5714 --> $DIR/tilde-const-and-const-params.rs:27:11
Deadbeefebf50282022-10-20 19:32:1615 |
16LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
Deadbeef16040a12023-11-24 14:32:0517 | ^^^^^^
Deadbeefebf50282022-10-20 19:32:1618 |
19note: this function is not `const`, so it cannot have `~const` trait bounds
Michael Goulet8b7b8e52024-10-22 03:22:5720 --> $DIR/tilde-const-and-const-params.rs:27:4
Deadbeefebf50282022-10-20 19:32:1621 |
22LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
23 | ^^^
24
Michael Goulet8b7b8e52024-10-22 03:22:5725error[E0277]: the trait bound `A: const Add42` is not satisfied
26 --> $DIR/tilde-const-and-const-params.rs:27:61
Deadbeefdaff0152024-06-30 17:08:4527 |
Michael Goulet8b7b8e52024-10-22 03:22:5728LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
29 | ^^^^^^^^^
Deadbeefdaff0152024-06-30 17:08:4530
Michael Goulet8b7b8e52024-10-22 03:22:5731error[E0277]: the trait bound `A: const Add42` is not satisfied
32 --> $DIR/tilde-const-and-const-params.rs:9:44
33 |
34LL | fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> {
35 | ^^^^^^^^^
Deadbeefebf50282022-10-20 19:32:1636
Michael Goulet8b7b8e52024-10-22 03:22:5737error: aborting due to 4 previous errors
38
39For more information about this error, try `rustc --explain E0277`.