error[E0283]: type annotations needed --> $DIR/issue-72690.rs:7:5 | LL | String::from("x".as_ref()); | ^^^^^^^^^^^^ cannot infer type for reference `&_` | = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: - impl<> From<&String> for String; - impl<> From<&str> for String; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:7:22 | LL | String::from("x".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 `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error[E0282]: type annotations needed --> $DIR/issue-72690.rs:12:6 | LL | |x| String::from("x".as_ref()); | ^ consider giving this closure parameter a type error[E0283]: type annotations needed --> $DIR/issue-72690.rs:12:9 | LL | |x| String::from("x".as_ref()); | ^^^^^^^^^^^^ cannot infer type for reference `&_` | = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: - impl<> From<&String> for String; - impl<> From<&str> for String; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:12:26 | LL | |x| String::from("x".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 `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error[E0283]: type annotations needed for `&T` --> $DIR/issue-72690.rs:18:17 | LL | let _ = "x".as_ref(); | - ^^^^^^ cannot infer type for type parameter `T` declared on the trait `AsRef` | | | consider giving this pattern the explicit type `&T`, where the type parameter `T` is specified | = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:22:5 | LL | String::from("x".as_ref()); | ^^^^^^^^^^^^ cannot infer type for reference `&_` | = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: - impl<> From<&String> for String; - impl<> From<&str> for String; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:22:22 | LL | String::from("x".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 `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:29:5 | LL | String::from("x".as_ref()); | ^^^^^^^^^^^^ cannot infer type for reference `&_` | = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: - impl<> From<&String> for String; - impl<> From<&str> for String; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:29:22 | LL | String::from("x".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 `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:38:5 | LL | String::from("x".as_ref()); | ^^^^^^^^^^^^ cannot infer type for reference `&_` | = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: - impl<> From<&String> for String; - impl<> From<&str> for String; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:38:22 | LL | String::from("x".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 `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:47:5 | LL | String::from("x".as_ref()); | ^^^^^^^^^^^^ cannot infer type for reference `&_` | = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: - impl<> From<&String> for String; - impl<> From<&str> for String; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:47:22 | LL | String::from("x".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 `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:54:5 | LL | String::from("x".as_ref()); | ^^^^^^^^^^^^ cannot infer type for reference `&_` | = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: - impl<> From<&String> for String; - impl<> From<&str> for String; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:54:22 | LL | String::from("x".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 `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:63:5 | LL | String::from("x".as_ref()); | ^^^^^^^^^^^^ cannot infer type for reference `&_` | = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: - impl<> From<&String> for String; - impl<> From<&str> for String; error[E0283]: type annotations needed --> $DIR/issue-72690.rs:63:22 | LL | String::from("x".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 `str: AsRef<_>` found in the following crates: `core`, `std`: - impl AsRef for str; - impl AsRef for str; - impl AsRef<[u8]> for str; - impl AsRef for str; error: aborting due to 18 previous errors Some errors have detailed explanations: E0282, E0283. For more information about an error, try `rustc --explain E0282`.