|
| 1 | +error[E0283]: type annotations needed |
| 2 | + --> $DIR/issue-72690.rs:7:5 |
| 3 | + | |
| 4 | +LL | String::from("x".as_ref()); |
| 5 | + | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` |
| 6 | + | |
| 7 | + = note: cannot satisfy `std::string::String: std::convert::From<&_>` |
| 8 | + = note: required by `std::convert::From::from` |
| 9 | + |
| 10 | +error[E0282]: type annotations needed |
| 11 | + --> $DIR/issue-72690.rs:11:6 |
| 12 | + | |
| 13 | +LL | |x| String::from("x".as_ref()); |
| 14 | + | ^ consider giving this closure parameter a type |
| 15 | + |
| 16 | +error[E0283]: type annotations needed |
| 17 | + --> $DIR/issue-72690.rs:15:17 |
| 18 | + | |
| 19 | +LL | let _ = "x".as_ref(); |
| 20 | + | ^^^^^^ cannot infer type for type `str` |
| 21 | + | |
| 22 | + = note: cannot satisfy `str: std::convert::AsRef<_>` |
| 23 | + |
| 24 | +error[E0283]: type annotations needed |
| 25 | + --> $DIR/issue-72690.rs:19:5 |
| 26 | + | |
| 27 | +LL | String::from("x".as_ref()); |
| 28 | + | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` |
| 29 | + | |
| 30 | + = note: cannot satisfy `std::string::String: std::convert::From<&_>` |
| 31 | + = note: required by `std::convert::From::from` |
| 32 | + |
| 33 | +error[E0283]: type annotations needed |
| 34 | + --> $DIR/issue-72690.rs:25:5 |
| 35 | + | |
| 36 | +LL | String::from("x".as_ref()); |
| 37 | + | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` |
| 38 | + | |
| 39 | + = note: cannot satisfy `std::string::String: std::convert::From<&_>` |
| 40 | + = note: required by `std::convert::From::from` |
| 41 | + |
| 42 | +error[E0283]: type annotations needed |
| 43 | + --> $DIR/issue-72690.rs:33:5 |
| 44 | + | |
| 45 | +LL | String::from("x".as_ref()); |
| 46 | + | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` |
| 47 | + | |
| 48 | + = note: cannot satisfy `std::string::String: std::convert::From<&_>` |
| 49 | + = note: required by `std::convert::From::from` |
| 50 | + |
| 51 | +error[E0283]: type annotations needed for `std::string::String` |
| 52 | + --> $DIR/issue-72690.rs:41:5 |
| 53 | + | |
| 54 | +LL | String::from("x".as_ref()); |
| 55 | + | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` |
| 56 | +LL | let _ = String::from("x"); |
| 57 | + | - consider giving this pattern a type |
| 58 | + | |
| 59 | + = note: cannot satisfy `std::string::String: std::convert::From<&_>` |
| 60 | + = note: required by `std::convert::From::from` |
| 61 | + |
| 62 | +error[E0283]: type annotations needed for `std::string::String` |
| 63 | + --> $DIR/issue-72690.rs:47:5 |
| 64 | + | |
| 65 | +LL | let _ = String::from("x"); |
| 66 | + | - consider giving this pattern a type |
| 67 | +LL | String::from("x".as_ref()); |
| 68 | + | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` |
| 69 | + | |
| 70 | + = note: cannot satisfy `std::string::String: std::convert::From<&_>` |
| 71 | + = note: required by `std::convert::From::from` |
| 72 | + |
| 73 | +error[E0283]: type annotations needed for `std::string::String` |
| 74 | + --> $DIR/issue-72690.rs:55:5 |
| 75 | + | |
| 76 | +LL | let _ = String::from("x"); |
| 77 | + | - consider giving this pattern a type |
| 78 | +... |
| 79 | +LL | String::from("x".as_ref()); |
| 80 | + | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` |
| 81 | + | |
| 82 | + = note: cannot satisfy `std::string::String: std::convert::From<&_>` |
| 83 | + = note: required by `std::convert::From::from` |
| 84 | + |
| 85 | +error: aborting due to 9 previous errors |
| 86 | + |
| 87 | +Some errors have detailed explanations: E0282, E0283. |
| 88 | +For more information about an error, try `rustc --explain E0282`. |
0 commit comments