Skip to content

Commit da399ea

Browse files
address review
1 parent b71fc0c commit da399ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_resolve/src/imports.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
830830
let mut indeterminate_count = 0;
831831
self.per_ns(|this, ns| {
832832
if !type_ns_only || ns == TypeNS {
833-
let Progress::Pending = bindings[ns].get() else {
833+
if bindings[ns].get() != Progress::Pending {
834834
return;
835835
};
836836
let binding_result = this.maybe_resolve_ident_in_module(
@@ -843,9 +843,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
843843
let parent = import.parent_scope.module;
844844
let binding = match binding_result {
845845
Ok(binding) => {
846-
// We need the `target`, `source` can be extracted.
847-
let imported_binding = this.import(binding, import);
848-
if imported_binding.is_assoc_item()
846+
if binding.is_assoc_item()
849847
&& !this.tcx.features().import_trait_associated_functions()
850848
{
851849
feature_err(
@@ -856,6 +854,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
856854
)
857855
.emit();
858856
}
857+
// We need the `target`, `source` can be extracted.
858+
let imported_binding = this.import(binding, import);
859859
this.define(parent, target, ns, imported_binding);
860860
Poll::Ready(Some(imported_binding))
861861
}

0 commit comments

Comments
 (0)