Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/add_missing_match_arms.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/add_missing_match_arms.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ide-assists/src/handlers/add_missing_match_arms.rs b/crates/ide-assists/src/handlers/add_missing_match_arms.rs index 3c33ddec31..f2d71a1dfe 100644 --- a/crates/ide-assists/src/handlers/add_missing_match_arms.rs +++ b/crates/ide-assists/src/handlers/add_missing_match_arms.rs @@ -4,7 +4,7 @@ use either::Either; use hir::{Adt, AsAssocItem, Crate, FindPathConfig, HasAttrs, ModuleDef, Semantics}; use ide_db::RootDatabase; use ide_db::syntax_helpers::suggest_name; -use ide_db::{famous_defs::FamousDefs, helpers::mod_path_to_ast}; +use ide_db::{famous_defs::FamousDefs, helpers::mod_path_to_ast_with_factory}; use itertools::Itertools; use syntax::ast::edit::IndentLevel; use syntax::ast::syntax_factory::SyntaxFactory; @@ -602,7 +602,11 @@ fn build_pat( false, ) } else { - mod_path_to_ast(&module.find_path(db, ModuleDef::from(var), cfg)?, edition) + mod_path_to_ast_with_factory( + make, + &module.find_path(db, ModuleDef::from(var), cfg)?, + edition, + ) }; let fields = var.fields(db); let pat: ast::Pat = match var.kind(db) { |