File tree Expand file tree Collapse file tree 2 files changed +1
-19
lines changed Expand file tree Collapse file tree 2 files changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ pub fn main() {
21
21
{
22
22
if String :: from ( "a" ) == "a" . try_into ( ) . unwrap ( ) { }
23
23
//~^ ERROR type annotations needed
24
- //~| ERROR type annotations needed
25
24
}
26
25
{
27
26
let _: String = match "_" . try_into ( ) {
Original file line number Diff line number Diff line change @@ -16,23 +16,6 @@ LL - if String::from("a") == "a".try_into().unwrap() {}
16
16
LL + if String::from("a") == <&str as TryInto<T>>::try_into("a").unwrap() {}
17
17
|
18
18
19
- error[E0283]: type annotations needed
20
- --> $DIR/issue-72616.rs:22:37
21
- |
22
- LL | if String::from("a") == "a".try_into().unwrap() {}
23
- | ^^^^^^^^
24
- |
25
- = note: multiple `impl`s satisfying `_: TryFrom<&str>` found in the following crates: `core`, `std`:
26
- - impl TryFrom<&str> for std::sys::net::connection::socket::LookupHost;
27
- - impl<T, U> TryFrom<U> for T
28
- where U: Into<T>;
29
- = note: required for `&str` to implement `TryInto<_>`
30
- help: try using a fully qualified path to specify the expected types
31
- |
32
- LL - if String::from("a") == "a".try_into().unwrap() {}
33
- LL + if String::from("a") == <&str as TryInto<T>>::try_into("a").unwrap() {}
34
- |
35
-
36
- error: aborting due to 2 previous errors
19
+ error: aborting due to 1 previous error
37
20
38
21
For more information about this error, try `rustc --explain E0283`.
You can’t perform that action at this time.
0 commit comments