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() {
2121    { 
2222        if  String :: from ( "a" )  == "a" . try_into ( ) . unwrap ( )  { } 
2323        //~^ ERROR type annotations needed 
24-         //~| ERROR type annotations needed 
2524    } 
2625    { 
2726        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() {}
1616LL +         if String::from("a") == <&str as TryInto<T>>::try_into("a").unwrap() {}
1717   |
1818
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
3720
3821For more information about this error, try `rustc --explain E0283`.
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments