diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-12-12 15:22:46 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-12-24 22:08:05 -0800 |
| commit | 759df5fa357ecc0f4a0dee9a3ac9c8b1c7160cb8 (patch) | |
| tree | 24bce09978a98d6603068d5174c97a8e31f09d4f /src/test/ui | |
| parent | 547abe0c52fedc11cd4d1276f7ad51ce29a411e6 (diff) | |
| download | rust-759df5fa357ecc0f4a0dee9a3ac9c8b1c7160cb8.tar.gz rust-759df5fa357ecc0f4a0dee9a3ac9c8b1c7160cb8.zip | |
Fix case in `associated-type-projection-from-multiple-supertraits.rs`
This still doesn't handle the case entirely correctly, requiring a more targeted approach with a better suggestion, but at least now the suggested syntax makes *some* sense.
Diffstat (limited to 'src/test/ui')
4 files changed, 11 insertions, 11 deletions
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 |
