Skip to content

Commit 94fcda0

Browse files
clean up E0214 explanation
1 parent bf84eb5 commit 94fcda0

File tree

1 file changed

+9
-4
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+9
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
A generic type was described using parentheses rather than angle brackets.
2-
For example:
2+
3+
Erroneous code example:
34

45
```compile_fail,E0214
5-
fn main() {
6-
let v: Vec(&str) = vec!["foo"];
7-
}
6+
let v: Vec(&str) = vec!["foo"];
87
```
98

109
This is not currently supported: `v` should be defined as `Vec<&str>`.
1110
Parentheses are currently only used with generic types when defining parameters
1211
for `Fn`-family traits.
12+
13+
The previous code example fixed:
14+
15+
```
16+
let v: Vec<&str> = vec!["foo"];
17+
```

0 commit comments

Comments
 (0)