Feature gate

This commit is contained in:
Jules Bertholet
2024-03-26 01:23:26 -04:00
parent e0da13f25f
commit 528d45af18
9 changed files with 76 additions and 9 deletions

View File

@@ -779,6 +779,10 @@ impl<'a> Parser<'a> {
self.ban_mut_general_pat(mut_span, &pat, changed_any_binding);
}
if matches!(pat.kind, PatKind::Ident(BindingAnnotation(ByRef::Yes(_), Mutability::Mut), ..))
{
self.psess.gated_spans.gate(sym::mut_ref, pat.span);
}
Ok(pat.into_inner().kind)
}