fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.2 KiB38 linesraw
1error[E0221]: ambiguous associated type `A` in bounds of `Self`
2  --> $DIR/E0221.rs:11:16
3   |
4LL |     type A: T1;
5   |     ----------- ambiguous `A` from `Foo`
6...
7LL |     type A: T2;
8   |     ----------- ambiguous `A` from `Bar`
9LL |     fn do_something() {
10LL |         let _: Self::A;
11   |                ^^^^^^^ ambiguous associated type `A`
12   |
13help: use fully qualified syntax to disambiguate
14   |
15LL |         let _: <Self as Foo>::A;
16   |                ^^^^^^^^^^^^^^^^
17help: use fully qualified syntax to disambiguate
18   |
19LL |         let _: <Self as Bar>::A;
20   |                ^^^^^^^^^^^^^^^^
21
22error[E0221]: ambiguous associated type `Err` in bounds of `Self`
23  --> $DIR/E0221.rs:21:16
24   |
25LL |     type Err: T3;
26   |     ------------- ambiguous `Err` from `My`
27LL |     fn test() {
28LL |         let _: Self::Err;
29   |                ^^^^^^^^^
30   |                |
31   |                ambiguous associated type `Err`
32   |                help: use fully qualified syntax to disambiguate: `<Self as My>::Err`
33   |
34   = note: associated type `Self` could derive from `std::str::FromStr`
35
36error: aborting due to 2 previous errors
37
38For more information about this error, try `rustc --explain E0221`.