Suggestion: allow `vec![T]`


I am not sure if feasible altogether, but in my opinion it would be convenient to define an empty Vec as follows:

let v = vec![T];

instead of:

let v: Vec<T> = vec![];


let v: Vec<T> = Vec::new();


The syntax currently is:

let v = Vec::<T>::new();


I doubt this is possible.

struct x {}
let x = 0i32;
let v = vec![x]; // what is v?


Also, you usually don’t need to specify the type, as it will be inferred.


Besides, it’s not at all intuitive to the reader without an explanation what a type inside a macro is when said macro usually takes values, not types.