2020-06-05 06:27:43 -05:00
|
|
|
error[E0283]: type annotations needed
|
|
|
|
--> $DIR/issue-72690.rs:7:5
|
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2023-08-26 14:25:46 -05:00
|
|
|
| ^^^^^^ cannot infer type for reference `&_`
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
= note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
|
2023-08-28 12:17:11 -05:00
|
|
|
- impl From<&String> for String;
|
|
|
|
- impl From<&str> for String;
|
2020-06-05 06:27:43 -05:00
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
error[E0283]: type annotations needed
|
|
|
|
--> $DIR/issue-72690.rs:7:22
|
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: try using a fully qualified path to specify the expected types
|
|
|
|
|
|
|
|
|
LL | String::from(<str as AsRef<T>>::as_ref("x"));
|
|
|
|
| ++++++++++++++++++++++++++ ~
|
2021-10-01 08:05:17 -05:00
|
|
|
|
2023-08-14 08:09:53 -05:00
|
|
|
error[E0283]: type annotations needed
|
|
|
|
--> $DIR/issue-72690.rs:12:9
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
|
LL | |x| String::from("x".as_ref());
|
2023-08-14 08:09:53 -05:00
|
|
|
| ^^^^^^ cannot infer type for reference `&_`
|
2022-02-14 06:25:26 -06:00
|
|
|
|
|
2023-08-14 08:09:53 -05:00
|
|
|
= note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
|
|
|
|
- impl From<&String> for String;
|
|
|
|
- impl From<&str> for String;
|
2020-06-05 06:27:43 -05:00
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
error[E0283]: type annotations needed
|
|
|
|
--> $DIR/issue-72690.rs:12:26
|
|
|
|
|
|
|
|
|
LL | |x| String::from("x".as_ref());
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: try using a fully qualified path to specify the expected types
|
|
|
|
|
|
|
|
|
LL | |x| String::from(<str as AsRef<T>>::as_ref("x"));
|
|
|
|
| ++++++++++++++++++++++++++ ~
|
2021-10-01 08:05:17 -05:00
|
|
|
|
2020-10-19 11:42:57 -05:00
|
|
|
error[E0283]: type annotations needed for `&T`
|
2022-02-14 06:25:26 -06:00
|
|
|
--> $DIR/issue-72690.rs:17:9
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
|
LL | let _ = "x".as_ref();
|
2022-06-25 11:28:27 -05:00
|
|
|
| ^ ------ type must be known at this point
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: consider giving this pattern a type, where the type for type parameter `T` is specified
|
|
|
|
|
|
|
|
|
LL | let _: &T = "x".as_ref();
|
|
|
|
| ++++
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:21:5
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2023-08-26 14:25:46 -05:00
|
|
|
| ^^^^^^ cannot infer type for reference `&_`
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
= note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
|
2023-08-28 12:17:11 -05:00
|
|
|
- impl From<&String> for String;
|
|
|
|
- impl From<&str> for String;
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:21:22
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: try using a fully qualified path to specify the expected types
|
|
|
|
|
|
|
|
|
LL | String::from(<str as AsRef<T>>::as_ref("x"));
|
|
|
|
| ++++++++++++++++++++++++++ ~
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:28:5
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2023-08-26 14:25:46 -05:00
|
|
|
| ^^^^^^ cannot infer type for reference `&_`
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
= note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
|
2023-08-28 12:17:11 -05:00
|
|
|
- impl From<&String> for String;
|
|
|
|
- impl From<&str> for String;
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:28:22
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: try using a fully qualified path to specify the expected types
|
|
|
|
|
|
|
|
|
LL | String::from(<str as AsRef<T>>::as_ref("x"));
|
|
|
|
| ++++++++++++++++++++++++++ ~
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:37:5
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2023-08-26 14:25:46 -05:00
|
|
|
| ^^^^^^ cannot infer type for reference `&_`
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
= note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
|
2023-08-28 12:17:11 -05:00
|
|
|
- impl From<&String> for String;
|
|
|
|
- impl From<&str> for String;
|
2020-06-05 06:27:43 -05:00
|
|
|
|
2020-10-19 11:42:57 -05:00
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:37:22
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: try using a fully qualified path to specify the expected types
|
|
|
|
|
|
|
|
|
LL | String::from(<str as AsRef<T>>::as_ref("x"));
|
|
|
|
| ++++++++++++++++++++++++++ ~
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:46:5
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2023-08-26 14:25:46 -05:00
|
|
|
| ^^^^^^ cannot infer type for reference `&_`
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
= note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
|
2023-08-28 12:17:11 -05:00
|
|
|
- impl From<&String> for String;
|
|
|
|
- impl From<&str> for String;
|
2020-06-05 06:27:43 -05:00
|
|
|
|
2020-10-19 11:42:57 -05:00
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:46:22
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: try using a fully qualified path to specify the expected types
|
|
|
|
|
|
|
|
|
LL | String::from(<str as AsRef<T>>::as_ref("x"));
|
|
|
|
| ++++++++++++++++++++++++++ ~
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:53:5
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2023-08-26 14:25:46 -05:00
|
|
|
| ^^^^^^ cannot infer type for reference `&_`
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
= note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
|
2023-08-28 12:17:11 -05:00
|
|
|
- impl From<&String> for String;
|
|
|
|
- impl From<&str> for String;
|
2020-06-05 06:27:43 -05:00
|
|
|
|
2020-10-19 11:42:57 -05:00
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:53:22
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: try using a fully qualified path to specify the expected types
|
|
|
|
|
|
|
|
|
LL | String::from(<str as AsRef<T>>::as_ref("x"));
|
|
|
|
| ++++++++++++++++++++++++++ ~
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:62:5
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2023-08-26 14:25:46 -05:00
|
|
|
| ^^^^^^ cannot infer type for reference `&_`
|
2020-06-05 06:27:43 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
= note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
|
2023-08-28 12:17:11 -05:00
|
|
|
- impl From<&String> for String;
|
|
|
|
- impl From<&str> for String;
|
2020-06-05 06:27:43 -05:00
|
|
|
|
2021-10-01 08:05:17 -05:00
|
|
|
error[E0283]: type annotations needed
|
2022-01-29 17:34:06 -06:00
|
|
|
--> $DIR/issue-72690.rs:62:22
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
LL | String::from("x".as_ref());
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
2021-10-01 08:05:17 -05:00
|
|
|
|
|
|
|
|
= note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
|
|
|
|
- impl AsRef<OsStr> for str;
|
|
|
|
- impl AsRef<Path> for str;
|
|
|
|
- impl AsRef<[u8]> for str;
|
|
|
|
- impl AsRef<str> for str;
|
2022-02-14 06:25:26 -06:00
|
|
|
help: try using a fully qualified path to specify the expected types
|
|
|
|
|
|
|
|
|
LL | String::from(<str as AsRef<T>>::as_ref("x"));
|
|
|
|
| ++++++++++++++++++++++++++ ~
|
2021-10-01 08:05:17 -05:00
|
|
|
|
2022-01-29 17:34:06 -06:00
|
|
|
error: aborting due to 17 previous errors
|
2020-06-05 06:27:43 -05:00
|
|
|
|
2023-08-14 08:09:53 -05:00
|
|
|
For more information about this error, try `rustc --explain E0283`.
|