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.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-ty/src/infer/pat.rs b/crates/hir-ty/src/infer/pat.rs
index 300c0cf214..8703b85e33 100644
--- a/crates/hir-ty/src/infer/pat.rs
+++ b/crates/hir-ty/src/infer/pat.rs
@@ -893,14 +893,14 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
let user_bind_annot = BindingMode::from_annotation(binding_data.mode);
let bm = match user_bind_annot {
BindingMode(ByRef::No, Mutability::Mut) if let ByRef::Yes(_) = def_br => {
- // Only mention the experimental `mut_ref` feature if if we're in edition 2024 and
+ // Only mention the experimental `mut_ref` feature if we're in edition 2024 and
// using other experimental matching features compatible with it.
if self.edition.at_least_2024()
&& (self.features.ref_pat_eat_one_layer_2024
|| self.features.ref_pat_eat_one_layer_2024_structural)
{
if !self.features.mut_ref {
- // FIXME: Emit an error: binding cannot be both mutable and by-reference.
+ self.push_diagnostic(InferenceDiagnostic::MutableRefBinding { pat });
}
BindingMode(def_br, Mutability::Mut)