diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-11 13:32:53 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-11 13:45:23 -0400 |
| commit | 954419aab01264707f116899e77be682b02764ea (patch) | |
| tree | 9c66d40f49925803e11e7aebe913bf39297a9751 /compiler/rustc_resolve/src/ident.rs | |
| parent | 5a2dd7d4f3210629e65879aeecbe643ba3b86bb4 (diff) | |
| download | rust-954419aab01264707f116899e77be682b02764ea.tar.gz rust-954419aab01264707f116899e77be682b02764ea.zip | |
Simplify some nested if statements
Diffstat (limited to 'compiler/rustc_resolve/src/ident.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/ident.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index 87f8e51f282..7f2bf03bcd1 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -958,12 +958,12 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { }); } - if !restricted_shadowing && binding.expansion != LocalExpnId::ROOT { - if let NameBindingKind::Import { import, .. } = binding.kind - && matches!(import.kind, ImportKind::MacroExport) - { - self.macro_expanded_macro_export_errors.insert((path_span, binding.span)); - } + if !restricted_shadowing + && binding.expansion != LocalExpnId::ROOT + && let NameBindingKind::Import { import, .. } = binding.kind + && matches!(import.kind, ImportKind::MacroExport) + { + self.macro_expanded_macro_export_errors.insert((path_span, binding.span)); } self.record_use(ident, binding, used); |
