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
With the following rust snippet, I get the error message:
$ rustc msg.rs
msg.rs:13:9: 13:12 error: unable to infer enough type information to locate the impl of the trait `core::kinds::Sized` for the type `Foo<<generic integer #0>>`; type annotations required
msg.rs:13 let foo = Foo::new(1);
^~~
msg.rs:13:9: 13:12 note: all local variables must have a statically known size
msg.rs:13 let foo = Foo::new(1);
^~~
error: aborting due to previous error
The issue is caused by having an extra semicolon at the last line of the new fn, but the error message was very confusing and it took me a while to realize that this was the problem.
Related to #18159 but not quite. It'd be much better it the message focused on 1 being an unconstrained integer variable (although that will be fixed separately by #16968).
x.rs:13:9: 13:12 error: unable to infer enough type information about `Foo<_>`; type annotations required
x.rs:13 let foo = Foo::new(1);
It's still not making it obvious that the lack of an integer suffix is the problem. That is going to be addressed by reintroducing integer fallback, though. Closing.
With the following rust snippet, I get the error message:
The issue is caused by having an extra semicolon at the last line of the new fn, but the error message was very confusing and it took me a while to realize that this was the problem.
The text was updated successfully, but these errors were encountered: