We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b603143 + 94dae60 commit 9b9192aCopy full SHA for 9b9192a
compiler/rustc_ast_lowering/src/item.rs
@@ -27,7 +27,7 @@ pub(super) struct ItemLowerer<'a, 'lowering, 'hir> {
27
impl ItemLowerer<'_, '_, '_> {
28
fn with_trait_impl_ref(&mut self, impl_ref: &Option<TraitRef>, f: impl FnOnce(&mut Self)) {
29
let old = self.lctx.is_in_trait_impl;
30
- self.lctx.is_in_trait_impl = if let &None = impl_ref { false } else { true };
+ self.lctx.is_in_trait_impl = impl_ref.is_some();
31
f(self);
32
self.lctx.is_in_trait_impl = old;
33
}
0 commit comments