Update E0214 to the new error format
This commit is contained in:
parent
f5e7a5910d
commit
f07f093522
@ -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(),
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user