about summary refs log tree commit diff
path: root/src/test/ui/specialization/defaultimpl
diff options
context:
space:
mode:
authorEsteban Kuber <esteban@kuber.com.ar>2021-10-13 13:58:41 +0000
committerEsteban Kuber <esteban@kuber.com.ar>2022-03-24 02:08:49 +0000
commit5fd37862d95a7fd898342e49ae5273edc8886b83 (patch)
treefe52310640ff222ce511fc596d06c447b68863ef /src/test/ui/specialization/defaultimpl
parent547369d3d881a9eb1de0d3e368f9a59aa7c648b0 (diff)
downloadrust-5fd37862d95a7fd898342e49ae5273edc8886b83.tar.gz
rust-5fd37862d95a7fd898342e49ae5273edc8886b83.zip
Properly track `ImplObligation`s
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.
Diffstat (limited to 'src/test/ui/specialization/defaultimpl')
-rw-r--r--src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr b/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
index 81e2a9a1ffc..9894ecc64b5 100644
--- a/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
+++ b/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
@@ -20,8 +20,7 @@ LL | struct MyStruct;
 LL |     println!("{}", MyStruct.foo_one());
    |                             ^^^^^^^ method cannot be called on `MyStruct` due to unsatisfied trait bounds
    |
-note: the following trait bounds were not satisfied because of the requirements of the implementation of `Foo` for `_`:
-      `MyStruct: Foo`
+note: trait bound `MyStruct: Foo` was not satisfied
   --> $DIR/specialization-trait-not-implemented.rs:14:17
    |
 LL | default impl<T> Foo for T {