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