@@ -830,7 +830,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
830
830
let mut indeterminate_count = 0 ;
831
831
self . per_ns ( |this, ns| {
832
832
if !type_ns_only || ns == TypeNS {
833
- let Progress :: Pending = bindings[ ns] . get ( ) else {
833
+ if bindings[ ns] . get ( ) != Progress :: Pending {
834
834
return ;
835
835
} ;
836
836
let binding_result = this. maybe_resolve_ident_in_module (
@@ -843,9 +843,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
843
843
let parent = import. parent_scope . module ;
844
844
let binding = match binding_result {
845
845
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 ( )
849
847
&& !this. tcx . features ( ) . import_trait_associated_functions ( )
850
848
{
851
849
feature_err (
@@ -856,6 +854,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
856
854
)
857
855
. emit ( ) ;
858
856
}
857
+ // We need the `target`, `source` can be extracted.
858
+ let imported_binding = this. import ( binding, import) ;
859
859
this. define ( parent, target, ns, imported_binding) ;
860
860
Poll :: Ready ( Some ( imported_binding) )
861
861
}
0 commit comments