about summary refs log tree commit diff
path: root/compiler/rustc_borrowck
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-08-06 00:17:16 +0000
committerMichael Goulet <michael@errs.io>2022-08-14 20:23:52 +0000
commit84ba2289fdd3c41ebbef53de3fdb5035f2e73e60 (patch)
treedad04ef206f6cfe16012ddf5a1eba369ff30108e /compiler/rustc_borrowck
parent801821d1560f84e4716fcbd9244ec959320a13d5 (diff)
downloadrust-84ba2289fdd3c41ebbef53de3fdb5035f2e73e60.tar.gz
rust-84ba2289fdd3c41ebbef53de3fdb5035f2e73e60.zip
Suggest as_ref or as_mut
Diffstat (limited to 'compiler/rustc_borrowck')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs
index 098e8de9420..cc5a3e16c96 100644
--- a/compiler/rustc_borrowck/src/diagnostics/mod.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs
@@ -1089,7 +1089,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                     if is_option_or_result && maybe_reinitialized_locations_is_empty {
                         err.span_suggestion_verbose(
                             fn_call_span.shrink_to_lo(),
-                            "consider calling `.as_ref()` to borrow the type's contents",
+                            "consider calling `.as_ref()` or `.as_mut()` to borrow the type's contents",
                             "as_ref().",
                             Applicability::MachineApplicable,
                         );