aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists/add_new.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/assists/add_new.rs')
-rw-r--r--crates/ra_assists/src/assists/add_new.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/add_new.rs b/crates/ra_assists/src/assists/add_new.rs
index 2038afdc6..b5f8afb4e 100644
--- a/crates/ra_assists/src/assists/add_new.rs
+++ b/crates/ra_assists/src/assists/add_new.rs
@@ -141,7 +141,7 @@ fn find_struct_impl(
141 })?; 141 })?;
142 142
143 let struct_ty = { 143 let struct_ty = {
144 let src = hir::Source { file_id: ctx.frange.file_id.into(), ast: strukt.clone() }; 144 let src = hir::Source { file_id: ctx.frange.file_id.into(), value: strukt.clone() };
145 hir::Struct::from_source(db, src).unwrap().ty(db) 145 hir::Struct::from_source(db, src).unwrap().ty(db)
146 }; 146 };
147 147
@@ -152,7 +152,7 @@ fn find_struct_impl(
152 return false; 152 return false;
153 } 153 }
154 154
155 let src = hir::Source { file_id: ctx.frange.file_id.into(), ast: impl_blk.clone() }; 155 let src = hir::Source { file_id: ctx.frange.file_id.into(), value: impl_blk.clone() };
156 let blk = hir::ImplBlock::from_source(db, src).unwrap(); 156 let blk = hir::ImplBlock::from_source(db, src).unwrap();
157 157
158 let same_ty = blk.target_ty(db) == struct_ty; 158 let same_ty = blk.target_ty(db) == struct_ty;