1
Fork 0

Use note to point at bound introducing requirement

This commit is contained in:
Esteban Küber 2021-07-31 09:26:55 -07:00 committed by Esteban Kuber
parent 92f3753b07
commit 39f220ce12
333 changed files with 3171 additions and 1929 deletions

View file

@ -9,13 +9,15 @@ LL | auto trait Magic: Copy {}
error[E0277]: the trait bound `NoClone: Copy` is not satisfied
--> $DIR/supertrait-auto-trait.rs:16:23
|
LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
| ----- required by this bound in `copy`
...
LL | let (a, b) = copy(NoClone);
| ^^^^^^^ the trait `Copy` is not implemented for `NoClone`
|
= note: required because of the requirements on the impl of `Magic` for `NoClone`
note: required by a bound in `copy`
--> $DIR/supertrait-auto-trait.rs:10:12
|
LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
| ^^^^^ required by this bound in `copy`
error: aborting due to 2 previous errors