Closed
Description
fn main() {
let x = ().foo();
<i32 as std::str::FromStr>::from_str(&x);
}
<anon>:2:16: 2:19 error: no method named `foo` found for type `()` in the current scope
<anon>:2:9: 2:10 error: the trait `core::marker::Sized` is not implemented for the type `str` [E0277]
Because of the method error, x
doesn't get a type (not even TyError
, AFAICT), and then it gets inferred to str
from another call in the function, which results in the unsized variable error.