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> + '_ {
999
999
..
1000
1000
} ) = node
1001
1001
&& 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}" ) )
1004
1003
&& 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
+ } )
1007
1009
. next ( )
1008
1010
{
1009
1011
Err ( struct_span_code_err ! ( self . dcx( ) , span, E0223 , "ambiguous associated type" )
You can’t perform that action at this time.
0 commit comments