Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/expand_rest_pattern.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/expand_rest_pattern.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ide-assists/src/handlers/expand_rest_pattern.rs b/crates/ide-assists/src/handlers/expand_rest_pattern.rs index c80b78fd97..1c0d330fc3 100644 --- a/crates/ide-assists/src/handlers/expand_rest_pattern.rs +++ b/crates/ide-assists/src/handlers/expand_rest_pattern.rs @@ -145,8 +145,11 @@ fn expand_tuple_struct_rest_pattern( make.ident_pat( false, false, - match name_gen.for_type(&f.ty(ctx.sema.db), ctx.sema.db, ctx.edition()) - { + match name_gen.for_type( + &f.ty(ctx.sema.db).to_type(ctx.sema.db), + ctx.sema.db, + ctx.edition(), + ) { Some(name) => make.name(&name), None => make.name(&format!("_{}", f.index())), }, |