Skip to content

Commit 94807b2

Browse files
committed
Rollup merge of #28195 - AlisdairO:diagnostics214, r=Manishearth
As title :-) Part of #24407. r? @Manishearth
2 parents 956c597 + 130e8d4 commit 94807b2

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/librustc_typeck/diagnostics.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,21 @@ extern "rust-intrinsic" {
22992299
```
23002300
"##,
23012301

2302+
E0214: r##"
2303+
A generic type was described using parentheses rather than angle brackets. For
2304+
example:
2305+
2306+
```
2307+
fn main() {
2308+
let v: Vec(&str) = vec!["foo"];
2309+
}
2310+
```
2311+
2312+
This is not currently supported: `v` should be defined as `Vec<&str>`.
2313+
Parentheses are currently only used with generic types when defining parameters
2314+
for `Fn`-family traits.
2315+
"##,
2316+
23022317
E0220: r##"
23032318
You used an associated type which isn't defined in the trait.
23042319
Erroneous code example:
@@ -3250,7 +3265,6 @@ register_diagnostics! {
32503265
// E0209, // builtin traits can only be implemented on structs or enums
32513266
E0212, // cannot extract an associated type from a higher-ranked trait bound
32523267
// E0213, // associated types are not accepted in this context
3253-
E0214, // parenthesized parameters may only be used with a trait
32543268
// E0215, // angle-bracket notation is not stable with `Fn`
32553269
// E0216, // parenthetical notation is only stable with `Fn`
32563270
// E0217, // ambiguous associated type, defined in multiple supertraits

0 commit comments

Comments
 (0)