@@ -5,7 +5,7 @@ use either::Either;
55use hir:: { AsAssocItem , HirDisplay , SemanticsScope } ;
66use rustc_hash:: FxHashMap ;
77use syntax:: {
8- ast:: { self , AstNode } ,
8+ ast:: { self , make , AstNode } ,
99 ted, SyntaxNode ,
1010} ;
1111
@@ -139,7 +139,7 @@ impl<'a> PathTransform<'a> {
139139 if let Some ( default) =
140140 & default. display_source_code ( db, source_module. into ( ) , false ) . ok ( )
141141 {
142- type_substs. insert ( k, ast :: make:: ty ( default) . clone_for_update ( ) ) ;
142+ type_substs. insert ( k, make:: ty ( default) . clone_for_update ( ) ) ;
143143 defaulted_params. push ( Either :: Left ( k) ) ;
144144 }
145145 }
@@ -162,7 +162,7 @@ impl<'a> PathTransform<'a> {
162162 }
163163 ( Either :: Left ( k) , None ) => {
164164 if let Some ( default) = k. default ( db) {
165- if let Some ( default) = ast :: make :: expr_const_value ( & default) . expr ( ) {
165+ if let Some ( default) = default. expr ( ) {
166166 const_substs. insert ( k, default. syntax ( ) . clone_for_update ( ) ) ;
167167 defaulted_params. push ( Either :: Right ( k) ) ;
168168 }
@@ -278,15 +278,14 @@ impl Ctx<'_> {
278278 hir:: ModuleDef :: Trait ( trait_ref) ,
279279 false ,
280280 ) ?;
281- match ast :: make:: ty_path ( mod_path_to_ast ( & found_path) ) {
281+ match make:: ty_path ( mod_path_to_ast ( & found_path) ) {
282282 ast:: Type :: PathType ( path_ty) => Some ( path_ty) ,
283283 _ => None ,
284284 }
285285 } ) ;
286286
287- let segment = ast:: make:: path_segment_ty ( subst. clone ( ) , trait_ref) ;
288- let qualified =
289- ast:: make:: path_from_segments ( std:: iter:: once ( segment) , false ) ;
287+ let segment = make:: path_segment_ty ( subst. clone ( ) , trait_ref) ;
288+ let qualified = make:: path_from_segments ( std:: iter:: once ( segment) , false ) ;
290289 ted:: replace ( path. syntax ( ) , qualified. clone_for_update ( ) . syntax ( ) ) ;
291290 } else if let Some ( path_ty) = ast:: PathType :: cast ( parent) {
292291 ted:: replace (
0 commit comments