summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0214.md
blob: b64ee80e284d5ce3868c48d12064aef16fc61198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
A generic type was described using parentheses rather than angle brackets.

Erroneous code example:

```compile_fail,E0214
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:

```
let v: Vec<&str> = vec!["foo"];
```