Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/pat.rs')
| -rw-r--r-- | crates/hir-ty/src/infer/pat.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir-ty/src/infer/pat.rs b/crates/hir-ty/src/infer/pat.rs index 915da943ca..81ba37726c 100644 --- a/crates/hir-ty/src/infer/pat.rs +++ b/crates/hir-ty/src/infer/pat.rs @@ -916,7 +916,7 @@ impl<'a, 'db> InferenceContext<'a, 'db> { if matches!(bm.0, ByRef::Yes(Mutability::Mut)) && let MutblCap::WeaklyNot = pat_info.max_ref_mutbl { - // FIXME: Emit an error: cannot borrow as mutable inside an `&` pattern. + self.push_diagnostic(InferenceDiagnostic::MutRefInImmRefPat { pat }); } // ...and store it in a side table: |