]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0214.md
Rollup merge of #72674 - Mark-Simulacrum:clippy-always-test-pass, r=oli-obk
[rust.git] / src / librustc_error_codes / 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 ```