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
letmut a = Vec::new();//1.With new() keywordletmut b = vec![];//2.Using the vec! macro
when I compile just these statements I get an error saying
error[E0282]: type annotations needed
--> a.rs:19:15
|
19 |let mut bv = vec![]; //2.Using the vec! macro
| ------ ^^^^^^ cannot infer typefor`T`||| consider giving `bv` a type|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
Shouldn't this be documented in the guide?
The text was updated successfully, but these errors were encountered:
In the very first example in the Vectors chapter
when I compile just these statements I get an error saying
Shouldn't this be documented in the guide?
The text was updated successfully, but these errors were encountered: