Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/generate_single_field_struct_from.rs')
-rw-r--r--crates/ide-assists/src/handlers/generate_single_field_struct_from.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-assists/src/handlers/generate_single_field_struct_from.rs b/crates/ide-assists/src/handlers/generate_single_field_struct_from.rs
index bdb42f9c1f..d3022ceda3 100644
--- a/crates/ide-assists/src/handlers/generate_single_field_struct_from.rs
+++ b/crates/ide-assists/src/handlers/generate_single_field_struct_from.rs
@@ -178,7 +178,7 @@ fn make_constructors(
types: &[ast::Type],
) -> Vec<Option<ast::Expr>> {
let (db, sema) = (ctx.db(), &ctx.sema);
- let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate(ctx.sema.db)));
types
.iter()
.map(|ty| {
@@ -187,7 +187,7 @@ fn make_constructors(
return Some(make::expr_tuple([]).into());
}
let item_in_ns = ModuleDef::Adt(ty.as_adt()?).into();
- let edition = module.krate().edition(db);
+ let edition = module.krate(db).edition(db);
let ty_path = module.find_path(db, item_for_path_search(db, item_in_ns)?, cfg)?;