Update E0214 to the new error format

This commit is contained in:
Panashe M. Fundira 2016-08-07 13:21:23 -04:00
parent f5e7a5910d
commit f07f093522
No known key found for this signature in database
GPG Key ID: ABD6E90F51BF74B5
2 changed files with 8 additions and 3 deletions

View File

@ -360,8 +360,11 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
self.convert_angle_bracketed_parameters(rscope, span, decl_generics, data)
}
hir::ParenthesizedParameters(..) => {
span_err!(tcx.sess, span, E0214,
"parenthesized parameters may only be used with a trait");
struct_span_err!(tcx.sess, span, E0214,
"parenthesized parameters may only be used with a trait")
.span_label(span, &format!("only traits may use parentheses"))
.emit();
let ty_param_defs = decl_generics.types.get_slice(TypeSpace);
(Substs::empty(),
ty_param_defs.iter().map(|_| tcx.types.err).collect(),

View File

@ -9,5 +9,7 @@
// except according to those terms.
fn main() {
let v: Vec(&str) = vec!["foo"]; //~ ERROR E0214
let v: Vec(&str) = vec!["foo"];
//~^ ERROR E0214
//~| NOTE only traits may use parentheses
}