diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-23 18:22:51 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-23 20:26:31 +0000 |
| commit | da40965300eec9aad4ea2f2fde9e6b59262cd5d6 (patch) | |
| tree | 57171d455fea2007b2cf5e7fc710ae71d47e7028 /compiler/rustc_ast_lowering/src | |
| parent | 9b9c7d0ecc9d902b3ed5eac2f06f8669fed57f43 (diff) | |
| download | rust-da40965300eec9aad4ea2f2fde9e6b59262cd5d6.tar.gz rust-da40965300eec9aad4ea2f2fde9e6b59262cd5d6.zip | |
Add `Mutability::{is_mut,is_not}`
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index d1666dfbf64..68bcdd828de 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -1781,9 +1781,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { // Given we are only considering `ImplicitSelf` types, we needn't consider // the case where we have a mutable pattern to a reference as that would // no longer be an `ImplicitSelf`. - TyKind::Rptr(_, mt) - if mt.ty.kind.is_implicit_self() && mt.mutbl == ast::Mutability::Mut => - { + TyKind::Rptr(_, mt) if mt.ty.kind.is_implicit_self() && mt.mutbl.is_mut() => { hir::ImplicitSelfKind::MutRef } TyKind::Rptr(_, mt) if mt.ty.kind.is_implicit_self() => { |
