1
Fork 0

Properly track ImplObligations

Instead of probing for all possible impls that could have caused an
`ImplObligation`, keep track of its `DefId` and obligation spans for
accurate error reporting.

Follow up to #89580. Addresses #89418.

Remove some unnecessary clones.

Tweak output for auto trait impl obligations.
This commit is contained in:
Esteban Kuber 2021-10-13 13:58:41 +00:00
parent 547369d3d8
commit 5fd37862d9
24 changed files with 426 additions and 218 deletions

View file

@ -14,7 +14,11 @@ LL | let (a, b) = copy(NoClone);
| |
| required by a bound introduced by this call
|
= note: required because of the requirements on the impl of `Magic` for `NoClone`
note: required because of the requirements on the impl of `Magic` for `NoClone`
--> $DIR/supertrait-auto-trait.rs:8:12
|
LL | auto trait Magic: Copy {}
| ^^^^^
note: required by a bound in `copy`
--> $DIR/supertrait-auto-trait.rs:10:12
|