Reword to avoid using either re-assignment or reassignment in errors
This commit is contained in:
parent
b2478052f8
commit
0e46cf4db4
10 changed files with 21 additions and 21 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue