about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/diagnostics
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-11-23 18:22:51 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-11-23 20:26:31 +0000
commitda40965300eec9aad4ea2f2fde9e6b59262cd5d6 (patch)
tree57171d455fea2007b2cf5e7fc710ae71d47e7028 /compiler/rustc_borrowck/src/diagnostics
parent9b9c7d0ecc9d902b3ed5eac2f06f8669fed57f43 (diff)
downloadrust-da40965300eec9aad4ea2f2fde9e6b59262cd5d6.tar.gz
rust-da40965300eec9aad4ea2f2fde9e6b59262cd5d6.zip
Add `Mutability::{is_mut,is_not}`
Diffstat (limited to 'compiler/rustc_borrowck/src/diagnostics')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
index 018f606db64..3922c637a8c 100644
--- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
@@ -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,