Skip to content

Commit

Permalink
updated E0070 to new error format
Browse files Browse the repository at this point in the history
  • Loading branch information
clementmiao committed Aug 12, 2016
1 parent 8787a12 commit 4ab00e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3463,8 +3463,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {

let tcx = self.tcx;
if !tcx.expr_is_lval(&lhs) {
span_err!(tcx.sess, expr.span, E0070,
"invalid left-hand side expression");
struct_span_err!(
tcx.sess, expr.span, E0070,
"invalid left-hand side expression")
.span_label(
expr.span,
&format!("left-hand of expression not valid"))
.emit();
}

let lhs_ty = self.expr_ty(&lhs);
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-26093.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ macro_rules! not_an_lvalue {
($thing:expr) => {
$thing = 42;
//~^ ERROR invalid left-hand side expression
//~^^ NOTE left-hand of expression not valid
}
}

Expand Down

0 comments on commit 4ab00e4

Please sign in to comment.