fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0283]: type annotations needed 2 --> $DIR/issue-77982.rs:8:10 3 | 4LL | opts.get(opt.as_ref()); 5 | ^^^ ------------ type must be known at this point 6 | | 7 | cannot infer type of the type parameter `Q` declared on the method `get` 8 | 9 = note: multiple `impl`s satisfying `String: Borrow<_>` found in the following crates: `alloc`, `core`: 10 - impl Borrow<str> for String; 11 - impl<T> Borrow<T> for T 12 where T: ?Sized; 13note: required by a bound in `HashMap::<K, V, S>::get` 14 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL 15help: consider specifying the generic argument 16 | 17LL | opts.get::<Q>(opt.as_ref()); 18 | +++++ 19 20error[E0283]: type annotations needed 21 --> $DIR/issue-77982.rs:8:10 22 | 23LL | opts.get(opt.as_ref()); 24 | ^^^ ------ type must be known at this point 25 | | 26 | cannot infer type of the type parameter `Q` declared on the method `get` 27 | 28 = note: multiple `impl`s satisfying `String: AsRef<_>` found in the following crates: `alloc`, `std`: 29 - impl AsRef<OsStr> for String; 30 - impl AsRef<Path> for String; 31 - impl AsRef<[u8]> for String; 32 - impl AsRef<str> for String; 33help: consider specifying the generic argument 34 | 35LL | opts.get::<Q>(opt.as_ref()); 36 | +++++ 37 38error[E0282]: type annotations needed 39 --> $DIR/issue-77982.rs:13:59 40 | 41LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect(); 42 | ^^^^ 43 | 44help: try using a fully qualified path to specify the expected types 45 | 46LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(<u32 as Into<T>>::into(0u32))).collect(); 47 | +++++++++++++++++++++++ ~ 48 49error[E0283]: type annotations needed for `Box<T>` 50 --> $DIR/issue-77982.rs:36:9 51 | 52LL | let _ = ().foo(); 53 | ^ --- type must be known at this point 54 | 55note: multiple `impl`s satisfying `(): Foo<'_, _>` found 56 --> $DIR/issue-77982.rs:29:1 57 | 58LL | impl Foo<'static, u32> for () {} 59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 60LL | impl<'a> Foo<'a, i16> for () {} 61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 62help: consider giving this pattern a type, where the type for type parameter `T` is specified 63 | 64LL | let _: Box<T> = ().foo(); 65 | ++++++++ 66 67error[E0283]: type annotations needed for `Box<T>` 68 --> $DIR/issue-77982.rs:40:9 69 | 70LL | let _ = (&()).bar(); 71 | ^ --- type must be known at this point 72 | 73note: multiple `impl`s satisfying `&(): Bar<'_, _>` found 74 --> $DIR/issue-77982.rs:32:1 75 | 76LL | impl<'a> Bar<'static, u32> for &'a () {} 77 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 78LL | impl<'a> Bar<'a, i16> for &'a () {} 79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 80help: consider giving this pattern a type, where the type for type parameter `T` is specified 81 | 82LL | let _: Box<T> = (&()).bar(); 83 | ++++++++ 84 85error: aborting due to 5 previous errors 86 87Some errors have detailed explanations: E0282, E0283. 88For more information about an error, try `rustc --explain E0282`.