1
Fork 0

Ensure inherited reference is never set to &mut behind an &

This commit is contained in:
Jules Bertholet 2024-04-06 17:07:09 -04:00
parent b6c409723b
commit e3945bd3a8
No known key found for this signature in database
GPG key ID: 32034DAFC38C1BFC
6 changed files with 124 additions and 67 deletions

View file

@ -69,7 +69,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
hir::PatKind::Ref(inner, _)
if self.typeck_results.skipped_ref_pats().contains(pat.hir_id) =>
{
self.lower_pattern_unadjusted(inner)
self.lower_pattern(inner)
}
_ => self.lower_pattern_unadjusted(pat),
};