1
Fork 0

Rollup merge of #96471 - BoxyUwU:let_else_considered_harmful, r=lcnr

replace let else with `?`

r? `@oli-obk`
This commit is contained in:
Dylan DPC 2022-04-28 02:40:36 +02:00 committed by GitHub
commit 4c628bbb1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 29 deletions

View file

@ -1183,9 +1183,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
ident: Symbol,
kind: &AssocItemKind,
) -> Option<Symbol> {
let Some((module, _)) = &self.current_trait_ref else {
return None;
};
let (module, _) = self.current_trait_ref.as_ref()?;
if ident == kw::Underscore {
// We do nothing for `_`.
return None;