fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0283]: type annotations needed 2 --> $DIR/issue-72690.rs:7:5 3 | 4LL | String::from("x".as_ref()); 5 | ^^^^^^ cannot infer type for reference `&_` 6 | 7 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: 8 - impl From<&String> for String; 9 - impl From<&str> for String; 10 11error[E0283]: type annotations needed 12 --> $DIR/issue-72690.rs:7:22 13 | 14LL | String::from("x".as_ref()); 15 | ^^^^^^ 16 | 17 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 18 - impl AsRef<OsStr> for str; 19 - impl AsRef<Path> for str; 20 - impl AsRef<[u8]> for str; 21 - impl AsRef<str> for str; 22help: try using a fully qualified path to specify the expected types 23 | 24LL | String::from(<str as AsRef<T>>::as_ref("x")); 25 | ++++++++++++++++++++++++++ ~ 26 27error[E0282]: type annotations needed 28 --> $DIR/issue-72690.rs:12:6 29 | 30LL | |x| String::from("x".as_ref()); 31 | ^ 32 | 33help: consider giving this closure parameter an explicit type 34 | 35LL | |x: /* Type */| String::from("x".as_ref()); 36 | ++++++++++++ 37 38error[E0283]: type annotations needed 39 --> $DIR/issue-72690.rs:12:26 40 | 41LL | |x| String::from("x".as_ref()); 42 | ^^^^^^ 43 | 44 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 45 - impl AsRef<OsStr> for str; 46 - impl AsRef<Path> for str; 47 - impl AsRef<[u8]> for str; 48 - impl AsRef<str> for str; 49help: try using a fully qualified path to specify the expected types 50 | 51LL | |x| String::from(<str as AsRef<T>>::as_ref("x")); 52 | ++++++++++++++++++++++++++ ~ 53 54error[E0283]: type annotations needed for `&T` 55 --> $DIR/issue-72690.rs:17:9 56 | 57LL | let _ = "x".as_ref(); 58 | ^ ------ type must be known at this point 59 | 60 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 61 - impl AsRef<OsStr> for str; 62 - impl AsRef<Path> for str; 63 - impl AsRef<[u8]> for str; 64 - impl AsRef<str> for str; 65help: consider giving this pattern a type, where the type for type parameter `T` is specified 66 | 67LL | let _: &T = "x".as_ref(); 68 | ++++ 69 70error[E0283]: type annotations needed 71 --> $DIR/issue-72690.rs:21:5 72 | 73LL | String::from("x".as_ref()); 74 | ^^^^^^ cannot infer type for reference `&_` 75 | 76 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: 77 - impl From<&String> for String; 78 - impl From<&str> for String; 79 80error[E0283]: type annotations needed 81 --> $DIR/issue-72690.rs:21:22 82 | 83LL | String::from("x".as_ref()); 84 | ^^^^^^ 85 | 86 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 87 - impl AsRef<OsStr> for str; 88 - impl AsRef<Path> for str; 89 - impl AsRef<[u8]> for str; 90 - impl AsRef<str> for str; 91help: try using a fully qualified path to specify the expected types 92 | 93LL | String::from(<str as AsRef<T>>::as_ref("x")); 94 | ++++++++++++++++++++++++++ ~ 95 96error[E0283]: type annotations needed 97 --> $DIR/issue-72690.rs:28:5 98 | 99LL | String::from("x".as_ref()); 100 | ^^^^^^ cannot infer type for reference `&_` 101 | 102 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: 103 - impl From<&String> for String; 104 - impl From<&str> for String; 105 106error[E0283]: type annotations needed 107 --> $DIR/issue-72690.rs:28:22 108 | 109LL | String::from("x".as_ref()); 110 | ^^^^^^ 111 | 112 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 113 - impl AsRef<OsStr> for str; 114 - impl AsRef<Path> for str; 115 - impl AsRef<[u8]> for str; 116 - impl AsRef<str> for str; 117help: try using a fully qualified path to specify the expected types 118 | 119LL | String::from(<str as AsRef<T>>::as_ref("x")); 120 | ++++++++++++++++++++++++++ ~ 121 122error[E0283]: type annotations needed 123 --> $DIR/issue-72690.rs:37:5 124 | 125LL | String::from("x".as_ref()); 126 | ^^^^^^ cannot infer type for reference `&_` 127 | 128 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: 129 - impl From<&String> for String; 130 - impl From<&str> for String; 131 132error[E0283]: type annotations needed 133 --> $DIR/issue-72690.rs:37:22 134 | 135LL | String::from("x".as_ref()); 136 | ^^^^^^ 137 | 138 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 139 - impl AsRef<OsStr> for str; 140 - impl AsRef<Path> for str; 141 - impl AsRef<[u8]> for str; 142 - impl AsRef<str> for str; 143help: try using a fully qualified path to specify the expected types 144 | 145LL | String::from(<str as AsRef<T>>::as_ref("x")); 146 | ++++++++++++++++++++++++++ ~ 147 148error[E0283]: type annotations needed 149 --> $DIR/issue-72690.rs:46:5 150 | 151LL | String::from("x".as_ref()); 152 | ^^^^^^ cannot infer type for reference `&_` 153 | 154 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: 155 - impl From<&String> for String; 156 - impl From<&str> for String; 157 158error[E0283]: type annotations needed 159 --> $DIR/issue-72690.rs:46:22 160 | 161LL | String::from("x".as_ref()); 162 | ^^^^^^ 163 | 164 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 165 - impl AsRef<OsStr> for str; 166 - impl AsRef<Path> for str; 167 - impl AsRef<[u8]> for str; 168 - impl AsRef<str> for str; 169help: try using a fully qualified path to specify the expected types 170 | 171LL | String::from(<str as AsRef<T>>::as_ref("x")); 172 | ++++++++++++++++++++++++++ ~ 173 174error[E0283]: type annotations needed 175 --> $DIR/issue-72690.rs:53:5 176 | 177LL | String::from("x".as_ref()); 178 | ^^^^^^ cannot infer type for reference `&_` 179 | 180 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: 181 - impl From<&String> for String; 182 - impl From<&str> for String; 183 184error[E0283]: type annotations needed 185 --> $DIR/issue-72690.rs:53:22 186 | 187LL | String::from("x".as_ref()); 188 | ^^^^^^ 189 | 190 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 191 - impl AsRef<OsStr> for str; 192 - impl AsRef<Path> for str; 193 - impl AsRef<[u8]> for str; 194 - impl AsRef<str> for str; 195help: try using a fully qualified path to specify the expected types 196 | 197LL | String::from(<str as AsRef<T>>::as_ref("x")); 198 | ++++++++++++++++++++++++++ ~ 199 200error[E0283]: type annotations needed 201 --> $DIR/issue-72690.rs:62:5 202 | 203LL | String::from("x".as_ref()); 204 | ^^^^^^ cannot infer type for reference `&_` 205 | 206 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate: 207 - impl From<&String> for String; 208 - impl From<&str> for String; 209 210error[E0283]: type annotations needed 211 --> $DIR/issue-72690.rs:62:22 212 | 213LL | String::from("x".as_ref()); 214 | ^^^^^^ 215 | 216 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`: 217 - impl AsRef<OsStr> for str; 218 - impl AsRef<Path> for str; 219 - impl AsRef<[u8]> for str; 220 - impl AsRef<str> for str; 221help: try using a fully qualified path to specify the expected types 222 | 223LL | String::from(<str as AsRef<T>>::as_ref("x")); 224 | ++++++++++++++++++++++++++ ~ 225 226error: aborting due to 17 previous errors 227 228Some errors have detailed explanations: E0282, E0283. 229For more information about an error, try `rustc --explain E0282`.