Use note to point at bound introducing requirement
This commit is contained in:
parent
92f3753b07
commit
39f220ce12
333 changed files with 3171 additions and 1929 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue