1 error[E0282]: type annotations needed for `Vec<T>`
2 --> $DIR/method-ambig-one-trait-unknown-int-type.rs:24:17
4 LL | let mut x = Vec::new();
5 | ----- ^^^^^^^^ cannot infer type for type parameter `T`
7 | consider giving `x` the explicit type `Vec<T>`, where the type parameter `T` is specified
9 error[E0283]: type annotations needed
10 --> $DIR/method-ambig-one-trait-unknown-int-type.rs:26:7
13 | ^^^ cannot infer type for struct `Vec<_>`
15 note: multiple `impl`s satisfying `Vec<_>: Foo` found
16 --> $DIR/method-ambig-one-trait-unknown-int-type.rs:9:1
18 LL | impl Foo for Vec<usize> {
19 | ^^^^^^^^^^^^^^^^^^^^^^^
21 LL | impl Foo for Vec<isize> {
22 | ^^^^^^^^^^^^^^^^^^^^^^^
24 error[E0308]: mismatched types
25 --> $DIR/method-ambig-one-trait-unknown-int-type.rs:33:20
27 LL | let y: usize = x.foo();
28 | ----- ^^^^^^^ expected `usize`, found `isize`
30 | expected due to this
32 help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
34 LL | let y: usize = x.foo().try_into().unwrap();
35 | ++++++++++++++++++++
37 error: aborting due to 3 previous errors
39 Some errors have detailed explanations: E0282, E0283, E0308.
40 For more information about an error, try `rustc --explain E0282`.