]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0214.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0214.md
1 A generic type was described using parentheses rather than angle brackets.
2
3 Erroneous code example:
4
5 ```compile_fail,E0214
6 let v: Vec(&str) = vec!["foo"];
7 ```
8
9 This is not currently supported: `v` should be defined as `Vec<&str>`.
10 Parentheses are currently only used with generic types when defining parameters
11 for `Fn`-family traits.
12
13 The previous code example fixed:
14
15 ```
16 let v: Vec<&str> = vec!["foo"];
17 ```