aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-02-07 14:13:00 +0000
committerFlorian Diebold <[email protected]>2020-02-07 17:28:10 +0000
commit6787f124b5557120cd1e4557cbdb59aa7f215be6 (patch)
tree810aa041297e9ff450dbb3a8a05f09a10c08f8a2 /crates/ra_assists
parent0718682cffaae34e5c106c793c60f6706fc04b05 (diff)
Clean up RPIT a bit
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/handlers/add_new.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_assists/src/handlers/add_new.rs b/crates/ra_assists/src/handlers/add_new.rs
index a08639311..12d63b54d 100644
--- a/crates/ra_assists/src/handlers/add_new.rs
+++ b/crates/ra_assists/src/handlers/add_new.rs
@@ -144,6 +144,7 @@ fn find_struct_impl(ctx: &AssistCtx, strukt: &ast::StructDef) -> Option<Option<a
144 let src = InFile { file_id: ctx.frange.file_id.into(), value: impl_blk.clone() }; 144 let src = InFile { file_id: ctx.frange.file_id.into(), value: impl_blk.clone() };
145 let blk = sb.to_def(src)?; 145 let blk = sb.to_def(src)?;
146 146
147 // TODO this check doesn't work
147 let same_ty = blk.target_ty(db) == struct_ty; 148 let same_ty = blk.target_ty(db) == struct_ty;
148 let not_trait_impl = blk.target_trait(db).is_none(); 149 let not_trait_impl = blk.target_trait(db).is_none();
149 150