]>
Commit | Line | Data |
---|---|---|
5099ac24 | 1 | error[E0277]: cannot add `NonConstAdd` to `NonConstAdd` in const contexts |
a2a8927a | 2 | --> $DIR/assoc-type.rs:18:16 |
94222f64 XL |
3 | | |
4 | LL | type Bar = NonConstAdd; | |
a2a8927a | 5 | | ^^^^^^^^^^^ no implementation for `NonConstAdd + NonConstAdd` |
94222f64 | 6 | | |
5099ac24 FG |
7 | = help: the trait `~const Add` is not implemented for `NonConstAdd` |
8 | note: the trait `Add` is implemented for `NonConstAdd`, but that implementation is not `const` | |
9 | --> $DIR/assoc-type.rs:18:16 | |
10 | | | |
11 | LL | type Bar = NonConstAdd; | |
12 | | ^^^^^^^^^^^ | |
94222f64 | 13 | note: required by a bound in `Foo::Bar` |
a2a8927a | 14 | --> $DIR/assoc-type.rs:14:15 |
94222f64 XL |
15 | | |
16 | LL | type Bar: ~const std::ops::Add; | |
17 | | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo::Bar` | |
923072b8 | 18 | help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement |
94222f64 | 19 | | |
5099ac24 FG |
20 | LL | impl const Foo for NonConstAdd where NonConstAdd: ~const Add { |
21 | | +++++++++++++++++++++++++++++ | |
94222f64 XL |
22 | |
23 | error: aborting due to previous error | |
24 | ||
25 | For more information about this error, try `rustc --explain E0277`. |