diff options
author | Aleksey Kladov <[email protected]> | 2020-01-16 15:27:21 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-01-16 15:27:21 +0000 |
commit | a3d6ddbe694498a1bf69c6253422efb89431164e (patch) | |
tree | ced08cf46f2f822abc630b6935ec5ecf4ee4dc0d /crates/ra_ide | |
parent | 8691ae8ac04ef9dc089a377770da86a952b0e4c1 (diff) |
More natural trait setup
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/src/impls.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide/src/impls.rs b/crates/ra_ide/src/impls.rs index bd14a6d13..fb9396195 100644 --- a/crates/ra_ide/src/impls.rs +++ b/crates/ra_ide/src/impls.rs | |||
@@ -44,15 +44,15 @@ fn impls_for_def( | |||
44 | let ty = match node { | 44 | let ty = match node { |
45 | ast::NominalDef::StructDef(def) => { | 45 | ast::NominalDef::StructDef(def) => { |
46 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; | 46 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; |
47 | sb.to_def::<hir::Struct, _>(src)?.ty(sb.db) | 47 | sb.to_def(src)?.ty(sb.db) |
48 | } | 48 | } |
49 | ast::NominalDef::EnumDef(def) => { | 49 | ast::NominalDef::EnumDef(def) => { |
50 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; | 50 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; |
51 | sb.to_def::<hir::Enum, _>(src)?.ty(sb.db) | 51 | sb.to_def(src)?.ty(sb.db) |
52 | } | 52 | } |
53 | ast::NominalDef::UnionDef(def) => { | 53 | ast::NominalDef::UnionDef(def) => { |
54 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; | 54 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; |
55 | sb.to_def::<hir::Union, _>(src)?.ty(sb.db) | 55 | sb.to_def(src)?.ty(sb.db) |
56 | } | 56 | } |
57 | }; | 57 | }; |
58 | 58 | ||