You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The message is technically correct, but it refers to a generic name U that is not present in user's source code, and has no meaning in the current context.
fnmain(){assert_eq!("bar".into(),"foo".into());}
error[E0282]: unable to infer enough type information about U
cannot infer type for U
It's even weirder that the type U is not in Into<T>'s definition, but comes from somewhere else inside stdlib.
pubtraitInto<T>{fninto(self) -> T;}
It would be clearer if rustc has shown Into<U> instead, or perhaps the stdlib implementation could rename the cryptic U to something self-explanatory like TypeToBeConvertedInto.