diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-13 15:15:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-13 15:15:59 +0200 |
| commit | acbf5e4f50f63adaa34f1308fc175c76709ff60a (patch) | |
| tree | e94a1c361889cae3fc55e2135dcd694d41d788c4 /compiler/rustc_resolve/src/ident.rs | |
| parent | 762b3143fca8bc76d70eef15581f73315af77ef8 (diff) | |
| parent | e3fc6e53481904a972b1096ecc8c8ea547b822ee (diff) | |
| download | rust-acbf5e4f50f63adaa34f1308fc175c76709ff60a.tar.gz rust-acbf5e4f50f63adaa34f1308fc175c76709ff60a.zip | |
Rollup merge of #143685 - LorrensP-2158466:merge-import-bindings, r=petrochenkov
Resolve: merge `source_bindings` and `target_bindings` into `bindings` Attempts to merge the 2 fields `source_bindings` and `target_bindings` of `ImportKind::Single` into 1 field called `bindings`. r? ````@petrochenkov````
Diffstat (limited to 'compiler/rustc_resolve/src/ident.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/ident.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index 558cbef0014..6772632b84e 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -1090,14 +1090,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { let Some(module) = single_import.imported_module.get() else { return true; }; - let ImportKind::Single { source, target, target_bindings, .. } = &single_import.kind - else { + let ImportKind::Single { source, target, bindings, .. } = &single_import.kind else { unreachable!(); }; if source != target { - if target_bindings.iter().all(|binding| binding.get().is_none()) { + if bindings.iter().all(|binding| binding.get().binding().is_none()) { return true; - } else if target_bindings[ns].get().is_none() && binding.is_some() { + } else if bindings[ns].get().binding().is_none() && binding.is_some() { return true; } } |
