2020-10-19 17:42:57 +01:00
|
|
|
error[E0283]: type annotations needed
|
|
|
|
--> $DIR/issue-77982.rs:8:10
|
|
|
|
|
|
|
|
|
LL | opts.get(opt.as_ref());
|
|
|
|
| ^^^ ------------ this method call resolves to `&T`
|
|
|
|
| |
|
|
|
|
| cannot infer type for type parameter `Q` declared on the associated function `get`
|
|
|
|
|
|
2021-10-01 13:05:17 +00:00
|
|
|
= note: multiple `impl`s satisfying `String: Borrow<_>` found in the following crates: `alloc`, `core`:
|
|
|
|
- impl Borrow<str> for String;
|
|
|
|
- impl<T> Borrow<T> for T
|
|
|
|
where T: ?Sized;
|
2020-10-19 17:42:57 +01:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2021-10-01 13:05:17 +00:00
|
|
|
--> $DIR/issue-77982.rs:8:18
|
|
|
|
|
|
|
|
|
LL | opts.get(opt.as_ref());
|
|
|
|
| ----^^^^^^--
|
|
|
|
| | |
|
|
|
|
| | cannot infer type for type parameter `T` declared on the trait `AsRef`
|
|
|
|
| this method call resolves to `&T`
|
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `String: AsRef<_>` found in the following crates: `alloc`, `std`:
|
|
|
|
- impl AsRef<OsStr> for String;
|
|
|
|
- impl AsRef<Path> for String;
|
|
|
|
- impl AsRef<[u8]> for String;
|
|
|
|
- impl AsRef<str> for String;
|
|
|
|
help: use the fully qualified path for the potential candidates
|
|
|
|
|
|
|
|
|
LL | opts.get(<String as AsRef<OsStr>>::as_ref(opt));
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
LL | opts.get(<String as AsRef<Path>>::as_ref(opt));
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
LL | opts.get(<String as AsRef<[u8]>>::as_ref(opt));
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2021-10-01 18:09:31 +00:00
|
|
|
LL | opts.get(<String as AsRef<str>>::as_ref(opt));
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2021-10-01 13:05:17 +00:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
|
|
|
--> $DIR/issue-77982.rs:13:44
|
2020-10-19 17:42:57 +01:00
|
|
|
|
|
|
|
|
LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect();
|
|
|
|
| ^^^^^^^^^ ----------- this method call resolves to `T`
|
|
|
|
| |
|
|
|
|
| cannot infer type for type parameter `T` declared on the trait `From`
|
|
|
|
|
|
2021-10-01 13:05:17 +00:00
|
|
|
= note: multiple `impl`s satisfying `u32: From<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl From<Ipv4Addr> for u32;
|
|
|
|
- impl From<NonZeroU32> for u32;
|
|
|
|
- impl From<bool> for u32;
|
|
|
|
- impl From<char> for u32;
|
|
|
|
and 3 more
|
2021-07-17 11:13:50 -07:00
|
|
|
note: required by `from`
|
|
|
|
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
|
|
|
|
|
|
|
|
LL | fn from(_: T) -> Self;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2020-10-19 17:42:57 +01:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed for `Box<T>`
|
2021-10-01 13:05:17 +00:00
|
|
|
--> $DIR/issue-77982.rs:36:16
|
2020-10-19 17:42:57 +01:00
|
|
|
|
|
|
|
|
LL | let _ = ().foo();
|
|
|
|
| - ^^^ cannot infer type for type parameter `T` declared on the trait `Foo`
|
|
|
|
| |
|
|
|
|
| consider giving this pattern the explicit type `Box<T>`, where the type parameter `T` is specified
|
|
|
|
|
|
2021-10-01 13:05:17 +00:00
|
|
|
note: multiple `impl`s satisfying `(): Foo<'_, _>` found
|
|
|
|
--> $DIR/issue-77982.rs:29:1
|
|
|
|
|
|
|
|
|
LL | impl Foo<'static, u32> for () {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | impl<'a> Foo<'a, i16> for () {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-10-19 17:42:57 +01:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed for `Box<T>`
|
2021-10-01 13:05:17 +00:00
|
|
|
--> $DIR/issue-77982.rs:40:19
|
2020-10-19 17:42:57 +01:00
|
|
|
|
|
|
|
|
LL | let _ = (&()).bar();
|
|
|
|
| - ^^^ cannot infer type for type parameter `T` declared on the trait `Bar`
|
|
|
|
| |
|
|
|
|
| consider giving this pattern the explicit type `Box<T>`, where the type parameter `T` is specified
|
|
|
|
|
|
2021-10-01 13:05:17 +00:00
|
|
|
note: multiple `impl`s satisfying `&(): Bar<'_, _>` found
|
|
|
|
--> $DIR/issue-77982.rs:32:1
|
|
|
|
|
|
|
|
|
LL | impl<'a> Bar<'static, u32> for &'a () {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | impl<'a> Bar<'a, i16> for &'a () {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-10-19 17:42:57 +01:00
|
|
|
|
2021-10-01 13:05:17 +00:00
|
|
|
error: aborting due to 5 previous errors
|
2020-10-19 17:42:57 +01:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|