File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -184,8 +184,11 @@ pub fn impl_trait(
184
184
ty : ast:: Path ,
185
185
ty_params : Option < ast:: GenericParamList > ,
186
186
) -> ast:: Impl {
187
- let ty_params = ty_params. map_or_else ( String :: new, |params| params. to_string ( ) ) ;
188
- ast_from_text ( & format ! ( "impl{ty_params} {trait_} for {ty}{ty_params} {{}}" ) )
187
+ // TODO : If this function is now correct we can also change `impl_` accordingly`
188
+ let ty_params_str = ty_params. as_ref ( ) . map_or_else ( String :: new, |params| params. to_string ( ) ) ;
189
+ let ty_genargs_str =
190
+ ty_params. map_or_else ( String :: new, |params| params. to_generic_args ( ) . to_string ( ) ) ;
191
+ ast_from_text ( & format ! ( "impl{ty_params_str} {trait_} for {ty}{ty_genargs_str} {{}}" ) )
189
192
}
190
193
191
194
pub fn path_segment ( name_ref : ast:: NameRef ) -> ast:: PathSegment {
You can’t perform that action at this time.
0 commit comments