From 5e1972eba7e95e68f6fc05b07dec15fb1e553e1b Mon Sep 17 00:00:00 2001 From: Esteban Kuber Date: Sat, 11 Dec 2021 02:20:41 +0000 Subject: Tweak assoc type obligation spans * Point at RHS of associated type in obligation span * Point at `impl` assoc type on projection error * Reduce verbosity of recursive obligations * Point at source of binding lifetime obligation * Tweak "required bound" note * Tweak "expected... found opaque (return) type" labels * Point at set type in impl assoc type WF errors --- src/test/ui/error-codes/E0271.stderr | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/test/ui/error-codes') diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr index 284eaafc6cc..9c9c7237d71 100644 --- a/src/test/ui/error-codes/E0271.stderr +++ b/src/test/ui/error-codes/E0271.stderr @@ -2,8 +2,13 @@ error[E0271]: type mismatch resolving `::AssociatedType == u32` --> $DIR/E0271.rs:10:5 | LL | foo(3_i8); - | ^^^ expected `u32`, found `&str` + | ^^^ type mismatch resolving `::AssociatedType == u32` | +note: expected this to be `u32` + --> $DIR/E0271.rs:7:43 + | +LL | impl Trait for i8 { type AssociatedType = &'static str; } + | ^^^^^^^^^^^^ note: required by a bound in `foo` --> $DIR/E0271.rs:3:32 | -- cgit 1.4.1-3-g733a5