]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/rfc-2632-const-trait-impl/assoc-type.stderr
Improve selection errors for `~const` trait bounds
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / assoc-type.stderr
index 4a4b4de4758baacfb9292a240b6cae50398154ad..05fce15f10bd7bdb9e043215f9e4c9fd29f46a02 100644 (file)
@@ -1,10 +1,10 @@
-error[E0277]: cannot add `NonConstAdd` to `NonConstAdd`
+error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied
   --> $DIR/assoc-type.rs:18:16
    |
 LL |     type Bar = NonConstAdd;
    |                ^^^^^^^^^^^ no implementation for `NonConstAdd + NonConstAdd`
    |
-   = help: the trait `Add` is not implemented for `NonConstAdd`
+   = help: the trait `~const Add` is not implemented for `NonConstAdd`
 note: required by a bound in `Foo::Bar`
   --> $DIR/assoc-type.rs:14:15
    |
@@ -12,8 +12,8 @@ LL |     type Bar: ~const std::ops::Add;
    |               ^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo::Bar`
 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
    |
-LL | impl const Foo for NonConstAdd where NonConstAdd: Add {
-   |                                ++++++++++++++++++++++
+LL | impl const Foo for NonConstAdd where NonConstAdd: ~const Add {
+   |                                +++++++++++++++++++++++++++++
 
 error: aborting due to previous error