Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/ide-assists/src/handlers/generate_new.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ide-assists/src/handlers/generate_new.rs b/crates/ide-assists/src/handlers/generate_new.rs
index 7f1eafb98d..756dc3d0fa 100644
--- a/crates/ide-assists/src/handlers/generate_new.rs
+++ b/crates/ide-assists/src/handlers/generate_new.rs
@@ -1,6 +1,6 @@
use ide_db::{
imports::import_assets::item_for_path_search, syntax_helpers::suggest_name::NameGenerator,
- use_trivial_constructor::use_trivial_constructor,
+ use_trivial_constructor::use_trivial_constructor_with_factory,
};
use syntax::{
ast::{self, AstNode, HasName, HasVisibility, StructKind, edit::AstNodeEdit},
@@ -90,7 +90,8 @@ pub(crate) fn generate_new(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option
let edition = current_module.krate(ctx.db()).edition(ctx.db());
- let expr = use_trivial_constructor(
+ let expr = use_trivial_constructor_with_factory(
+ make,
ctx.sema.db,
ide_db::helpers::mod_path_to_ast_with_factory(make, &type_path, edition),
&ty,