A generic type was described using parentheses rather than angle brackets.
Erroneous code example:
#![allow(unused)]
fn main() {
let v: Vec(&str) = vec!["foo"];
} This is not currently supported: v should be defined as Vec<&str>. Parentheses are currently only used with generic types when defining parameters for Fn-family traits.
The previous code example fixed:
#![allow(unused)]
fn main() {
let v: Vec<&str> = vec!["foo"];
}
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0214.html