aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists/add_new.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-20 06:44:37 +0000
committerGitHub <[email protected]>2019-11-20 06:44:37 +0000
commit4dae39a609fb58b42cbe152e66d30fe6471a34d7 (patch)
tree166ee3c45f99611f7c20740c2a246f5b3bed41a3 /crates/ra_assists/src/assists/add_new.rs
parenteec68e6f451ee7675ce2cb29b696df091e6aed13 (diff)
parent36e3fc9d5413f7e6e17e82867aae1318645880a3 (diff)
Merge #2319
2319: Rename Source::ast -> Source::value r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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;