updated E0067 to new error format

This commit is contained in:
Clement Miao 2016-08-13 00:03:04 -07:00
parent 8787a12334
commit bd90a16151
2 changed files with 9 additions and 1 deletions

View File

@ -41,7 +41,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
let tcx = self.tcx;
if !tcx.expr_is_lval(lhs_expr) {
span_err!(tcx.sess, lhs_expr.span, E0067, "invalid left-hand side expression");
struct_span_err!(
tcx.sess, lhs_expr.span,
E0067, "invalid left-hand side expression")
.span_label(
lhs_expr.span,
&format!("invalid expression for left-hand side"))
.emit();
}
}

View File

@ -13,4 +13,6 @@ use std::collections::LinkedList;
fn main() {
LinkedList::new() += 1; //~ ERROR E0368
//~^ ERROR E0067
//~^^ NOTE invalid expression for left-hand side
//~| NOTE cannot use `+=` on type `std::collections::LinkedList<_>`
}