File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
compiler/rustc_hir_analysis/src/hir_ty_lowering Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -999,11 +999,13 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
999999 ..
10001000 } ) = node
10011001 && let Some ( adt_def) = qself_ty. ty_adt_def ( )
1002- && let [ inherent_impl] = tcx. inherent_impls ( adt_def. did ( ) )
1003- && let name = format ! ( "{ident2}_{ident3}" )
1002+ && let name = Symbol :: intern ( & format ! ( "{ident2}_{ident3}" ) )
10041003 && let Some ( ty:: AssocItem { kind : ty:: AssocKind :: Fn , .. } ) = tcx
1005- . associated_items ( inherent_impl)
1006- . filter_by_name_unhygienic ( Symbol :: intern ( & name) )
1004+ . inherent_impls ( adt_def. did ( ) )
1005+ . iter ( )
1006+ . flat_map ( |inherent_impl| {
1007+ tcx. associated_items ( inherent_impl) . filter_by_name_unhygienic ( name)
1008+ } )
10071009 . next ( )
10081010 {
10091011 Err ( struct_span_code_err ! ( self . dcx( ) , span, E0223 , "ambiguous associated type" )
You can’t perform that action at this time.
0 commit comments