From 9fa165d11b5eeedcf6e04f4812704d7fccf60ed6 Mon Sep 17 00:00:00 2001 From: Esteban Kuber Date: Wed, 13 Oct 2021 14:28:28 +0000 Subject: Point at `impl` blocks when they introduce unmet obligations Group obligations by `impl` block that introduced them. --- .../defaultimpl/specialization-trait-not-implemented.stderr | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/test/ui/specialization/defaultimpl') 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 ce981bc0098..81e2a9a1ffc 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,12 @@ 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: - `MyStruct: Foo` +note: the following trait bounds were not satisfied because of the requirements of the implementation of `Foo` for `_`: + `MyStruct: Foo` + --> $DIR/specialization-trait-not-implemented.rs:14:17 + | +LL | default impl Foo for T { + | ^^^ ^ note: the following trait must be implemented --> $DIR/specialization-trait-not-implemented.rs:7:1 | -- cgit 1.4.1-3-g733a5