Reword to avoid using either re-assignment or reassignment in errors

This commit is contained in:
Carol (Nichols || Goulding) 2017-10-25 11:29:14 -04:00
parent b2478052f8
commit 0e46cf4db4
10 changed files with 21 additions and 21 deletions

View file

@ -1161,7 +1161,7 @@ impl<'c, 'b, 'a: 'b+'c, 'gcx, 'tcx: 'a> MirBorrowckCtxt<'c, 'b, 'a, 'gcx, 'tcx>
self.tcx.cannot_reassign_immutable(span,
&self.describe_lvalue(lvalue),
Origin::Mir)
.span_label(span, "re-assignment of immutable variable")
.span_label(span, "cannot assign twice to immutable variable")
.span_label(assigned_span, format!("first assignment to `{}`",
self.describe_lvalue(lvalue)))
.emit();

View file

@ -232,7 +232,7 @@ pub trait BorrowckErrors {
-> DiagnosticBuilder
{
struct_span_err!(self, span, E0384,
"re-assignment of immutable variable `{}`{OGN}",
"cannot assign twice to immutable variable `{}`{OGN}",
desc, OGN=o)
}