about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-09-03 23:30:38 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-09-04 01:40:04 +0530
commit94807b2f9cfbf86c6a749be1739c4ed6e433da2a (patch)
tree5aa904fcc8d495d5b7023399ea927d034f436fb3 /src
parent956c5977ac9a5000dec53baae88c9cef1ec92ed0 (diff)
parent130e8d4ff2c38e4fb870c9d95fbdc0014504bfad (diff)
downloadrust-94807b2f9cfbf86c6a749be1739c4ed6e433da2a.tar.gz
rust-94807b2f9cfbf86c6a749be1739c4ed6e433da2a.zip
Rollup merge of #28195 - AlisdairO:diagnostics214, r=Manishearth
As title :-)
Part of #24407.

r? @Manishearth
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/diagnostics.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index 826524a415f..dfce7a9c315 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -2299,6 +2299,21 @@ extern "rust-intrinsic" {
 ```
 "##,
 
+E0214: r##"
+A generic type was described using parentheses rather than angle brackets. For
+example:
+
+```
+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.
+"##,
+
 E0220: r##"
 You used an associated type which isn't defined in the trait.
 Erroneous code example:
@@ -3250,7 +3265,6 @@ register_diagnostics! {
 //  E0209, // builtin traits can only be implemented on structs or enums
     E0212, // cannot extract an associated type from a higher-ranked trait bound
 //  E0213, // associated types are not accepted in this context
-    E0214, // parenthesized parameters may only be used with a trait
 //  E0215, // angle-bracket notation is not stable with `Fn`
 //  E0216, // parenthetical notation is only stable with `Fn`
 //  E0217, // ambiguous associated type, defined in multiple supertraits