Add Mutability::{is_mut,is_not}
This commit is contained in:
parent
9b9c7d0ecc
commit
da40965300
14 changed files with 29 additions and 26 deletions
|
@ -578,7 +578,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
err.multipart_suggestion_verbose(
|
||||
&format!(
|
||||
"consider {}borrowing {value_name}",
|
||||
if borrow_level == hir::Mutability::Mut { "mutably " } else { "" }
|
||||
if borrow_level.is_mut() { "mutably " } else { "" }
|
||||
),
|
||||
sugg,
|
||||
Applicability::MaybeIncorrect,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue