Add Mutability::mutably_str
This commit is contained in:
parent
e51cd6e822
commit
4439f1f6a6
3 changed files with 17 additions and 22 deletions
|
@ -576,10 +576,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
})
|
||||
.collect();
|
||||
err.multipart_suggestion_verbose(
|
||||
&format!(
|
||||
"consider {}borrowing {value_name}",
|
||||
if borrow_level.is_mut() { "mutably " } else { "" }
|
||||
),
|
||||
format!("consider {}borrowing {value_name}", borrow_level.mutably_str()),
|
||||
sugg,
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue