mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 13:36:49 +00:00
updated E0070 to new error format
This commit is contained in:
parent
8787a12334
commit
4ab00e4397
@ -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);
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user