]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/diagnostics.rs
Auto merge of #44060 - taleks:issue-43205, r=arielb1
[rust.git] / src / librustc / diagnostics.rs
index 34d31028385cfa9b27b60ba95506e0ba815ab672..412759e11423e94ed22176988b06ba484b1833e7 100644 (file)
@@ -687,6 +687,21 @@ fn foo<T: MyTransmutableType>(x: Vec<T>) {
 See also https://doc.rust-lang.org/book/first-edition/no-stdlib.html
 "##,
 
+E0214: r##"
+A generic type was described using parentheses rather than angle brackets. For
+example:
+
+```compile_fail,E0214
+fn main() {
+    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.
+"##,
+
 E0261: r##"
 When using a lifetime like `'a` in a type, it must be declared before being
 used.