about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorEsteban Kuber <esteban@kuber.com.ar>2021-12-11 02:20:41 +0000
committerEsteban Kuber <esteban@kuber.com.ar>2021-12-11 02:32:15 +0000
commit5e1972eba7e95e68f6fc05b07dec15fb1e553e1b (patch)
treefd01764b7ebb5b4c0f952c4fbce21d2a48b1d0e1 /src/test/ui/error-codes
parentf0448f44bcda55fd9eb71da82495ef648eedb4e4 (diff)
downloadrust-5e1972eba7e95e68f6fc05b07dec15fb1e553e1b.tar.gz
rust-5e1972eba7e95e68f6fc05b07dec15fb1e553e1b.zip
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
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0271.stderr7
1 files changed, 6 insertions, 1 deletions
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 `<i8 as Trait>::AssociatedType == u32`
   --> $DIR/E0271.rs:10:5
    |
 LL |     foo(3_i8);
-   |     ^^^ expected `u32`, found `&str`
+   |     ^^^ type mismatch resolving `<i8 as Trait>::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
    |