about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_typeck/astconv.rs4
-rw-r--r--src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr12
-rw-r--r--src/test/ui/error-codes/E0220.stderr4
-rw-r--r--src/test/ui/span/type-binding.stderr2
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr4
5 files changed, 14 insertions, 12 deletions
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs
index 9d9a027645f..85ec81a9534 100644
--- a/src/librustc_typeck/astconv.rs
+++ b/src/librustc_typeck/astconv.rs
@@ -937,6 +937,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
                 bounds,
                 speculative,
                 &mut dup_bindings,
+                span,
             );
             // Okay to ignore `Err` because of `ErrorReported` (see above).
         }
@@ -1189,6 +1190,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
         bounds: &mut Bounds<'tcx>,
         speculative: bool,
         dup_bindings: &mut FxHashMap<DefId, Span>,
+        path_span: Span,
     ) -> Result<(), ErrorReported> {
         let tcx = self.tcx();
 
@@ -1259,7 +1261,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
                     || traits::supertraits(tcx, trait_ref),
                     &trait_ref.print_only_trait_path().to_string(),
                     binding.item_name,
-                    binding.span,
+                    path_span,
                 )
             }?;
 
diff --git a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
index 4f14cffb065..9a5787db41e 100644
--- a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
+++ b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
@@ -26,7 +26,7 @@ LL | fn dent<C:BoxCar>(c: C, color: <C as Vehicle>::Color) {
    |                                ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0221]: ambiguous associated type `Color` in bounds of `BoxCar`
-  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:25:37
+  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:25:30
    |
 LL |     type Color;
    |     ----------- ambiguous `Color` from `Vehicle`
@@ -35,16 +35,16 @@ LL |     type Color;
    |     ----------- ambiguous `Color` from `Box`
 ...
 LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
-   |                                     ^^^^^^^^^^^ ambiguous associated type `Color`
+   |                              ^^^^^^^^^^^^^^^^^^^ ambiguous associated type `Color`
    |
 help: use fully qualified syntax to disambiguate
    |
-LL | fn dent_object<COLOR>(c: dyn BoxCar<<BoxCar as Box>::Color>) {
-   |                                     ^^^^^^^^^^^^^^^^^^^^^^
+LL | fn dent_object<COLOR>(c: dyn <BoxCar as Box>::Color) {
+   |                              ^^^^^^^^^^^^^^^^^^^^^^
 help: use fully qualified syntax to disambiguate
    |
-LL | fn dent_object<COLOR>(c: dyn BoxCar<<BoxCar as Vehicle>::Color>) {
-   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn dent_object<COLOR>(c: dyn <BoxCar as Vehicle>::Color) {
+   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0191]: the value of the associated type `Color` (from trait `Vehicle`) must be specified
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:25:30
diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr
index 58a92fe9832..73e66ceb845 100644
--- a/src/test/ui/error-codes/E0220.stderr
+++ b/src/test/ui/error-codes/E0220.stderr
@@ -1,8 +1,8 @@
 error[E0220]: associated type `F` not found for `Trait`
-  --> $DIR/E0220.rs:5:22
+  --> $DIR/E0220.rs:5:16
    |
 LL | type Foo = dyn Trait<F=i32>;
-   |                      ^^^^^ associated type `F` not found
+   |                ^^^^^^^^^^^^ associated type `F` not found
 
 error[E0191]: the value of the associated type `Bar` (from trait `Trait`) must be specified
   --> $DIR/E0220.rs:5:16
diff --git a/src/test/ui/span/type-binding.stderr b/src/test/ui/span/type-binding.stderr
index c3e95455532..5b64fe18892 100644
--- a/src/test/ui/span/type-binding.stderr
+++ b/src/test/ui/span/type-binding.stderr
@@ -1,5 +1,5 @@
 error[E0220]: associated type `Trget` not found for `std::ops::Deref`
-  --> $DIR/type-binding.rs:6:20
+  --> $DIR/type-binding.rs:6:14
    |
 LL | fn homura<T: Deref<Trget = i32>>(_: T) {}
    |                    ^^^^^^^^^^^ help: there is an associated type with a similar name: `Target`
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
index c81402a3dcc..ff65fd968c5 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
@@ -5,10 +5,10 @@ LL | fn f<F:Trait(isize) -> isize>(x: F) {}
    |        ^^^^^^^^^^^^ unexpected type argument
 
 error[E0220]: associated type `Output` not found for `Trait`
-  --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:24
+  --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:8
    |
 LL | fn f<F:Trait(isize) -> isize>(x: F) {}
-   |                        ^^^^^ associated type `Output` not found
+   |        ^^^^^^^^^^^^^^^^^^^^^ associated type `Output` not found
 
 error: aborting due to 2 previous errors