@@ -5,7 +5,7 @@ use either::Either;
5
5
use hir:: { AsAssocItem , HirDisplay , SemanticsScope } ;
6
6
use rustc_hash:: FxHashMap ;
7
7
use syntax:: {
8
- ast:: { self , AstNode } ,
8
+ ast:: { self , make , AstNode } ,
9
9
ted, SyntaxNode ,
10
10
} ;
11
11
@@ -139,7 +139,7 @@ impl<'a> PathTransform<'a> {
139
139
if let Some ( default) =
140
140
& default. display_source_code ( db, source_module. into ( ) , false ) . ok ( )
141
141
{
142
- type_substs. insert ( k, ast :: make:: ty ( default) . clone_for_update ( ) ) ;
142
+ type_substs. insert ( k, make:: ty ( default) . clone_for_update ( ) ) ;
143
143
defaulted_params. push ( Either :: Left ( k) ) ;
144
144
}
145
145
}
@@ -162,7 +162,7 @@ impl<'a> PathTransform<'a> {
162
162
}
163
163
( Either :: Left ( k) , None ) => {
164
164
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 ( ) {
166
166
const_substs. insert ( k, default. syntax ( ) . clone_for_update ( ) ) ;
167
167
defaulted_params. push ( Either :: Right ( k) ) ;
168
168
}
@@ -278,15 +278,14 @@ impl Ctx<'_> {
278
278
hir:: ModuleDef :: Trait ( trait_ref) ,
279
279
false ,
280
280
) ?;
281
- match ast :: make:: ty_path ( mod_path_to_ast ( & found_path) ) {
281
+ match make:: ty_path ( mod_path_to_ast ( & found_path) ) {
282
282
ast:: Type :: PathType ( path_ty) => Some ( path_ty) ,
283
283
_ => None ,
284
284
}
285
285
} ) ;
286
286
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 ) ;
290
289
ted:: replace ( path. syntax ( ) , qualified. clone_for_update ( ) . syntax ( ) ) ;
291
290
} else if let Some ( path_ty) = ast:: PathType :: cast ( parent) {
292
291
ted:: replace (
0 commit comments