1
Fork 0

Rollup merge of #107467 - WaffleLapkin:uneq, r=oli-obk

Improve enum checks

Some light refactoring.
This commit is contained in:
Guillaume Gomez 2023-01-31 23:38:52 +01:00 committed by GitHub
commit 53bb6322db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 278 additions and 260 deletions

View file

@ -344,7 +344,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
} else {
err.span_help(source_info.span, "try removing `&mut` here");
}
} else if decl.mutability == Mutability::Not {
} else if decl.mutability.is_not() {
if matches!(
decl.local_info,
Some(box LocalInfo::User(ClearCrossCrate::Set(BindingForm::ImplicitSelf(