Skip to content

Commit 9b9192a

Browse files
authored
Rollup merge of #76809 - matthiaskrgr:simplify_cond, r=varkor
simplfy condition in ItemLowerer::with_trait_impl_ref()
2 parents b603143 + 94dae60 commit 9b9192a

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+1
-1
lines changed

compiler/rustc_ast_lowering/src/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub(super) struct ItemLowerer<'a, 'lowering, 'hir> {
2727
impl ItemLowerer<'_, '_, '_> {
2828
fn with_trait_impl_ref(&mut self, impl_ref: &Option<TraitRef>, f: impl FnOnce(&mut Self)) {
2929
let old = self.lctx.is_in_trait_impl;
30-
self.lctx.is_in_trait_impl = if let &None = impl_ref { false } else { true };
30+
self.lctx.is_in_trait_impl = impl_ref.is_some();
3131
f(self);
3232
self.lctx.is_in_trait_impl = old;
3333
}

0 commit comments

Comments
 (0)