diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-07 11:15:26 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-07 11:15:26 +0000 |
commit | 336909b63a14b801520c6627d90d750babcfe280 (patch) | |
tree | b5b73fc760b261fafda58a3e20e04b8e74559c60 /crates/ide/src | |
parent | 75a87ec198b25c5938c651ef087f9ebf923c34f8 (diff) | |
parent | 7022ea52b5f2a0262c2cd96b290ddb8ec0af0df9 (diff) |
Merge #7587
7587: AdtDef -> Adt r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/goto_implementation.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/goto_implementation.rs b/crates/ide/src/goto_implementation.rs index 761a98b2c..3990305fc 100644 --- a/crates/ide/src/goto_implementation.rs +++ b/crates/ide/src/goto_implementation.rs | |||
@@ -23,7 +23,7 @@ pub(crate) fn goto_implementation( | |||
23 | 23 | ||
24 | let krate = sema.to_module_def(position.file_id)?.krate(); | 24 | let krate = sema.to_module_def(position.file_id)?.krate(); |
25 | 25 | ||
26 | if let Some(nominal_def) = find_node_at_offset::<ast::AdtDef>(&syntax, position.offset) { | 26 | if let Some(nominal_def) = find_node_at_offset::<ast::Adt>(&syntax, position.offset) { |
27 | return Some(RangeInfo::new( | 27 | return Some(RangeInfo::new( |
28 | nominal_def.syntax().text_range(), | 28 | nominal_def.syntax().text_range(), |
29 | impls_for_def(&sema, &nominal_def, krate)?, | 29 | impls_for_def(&sema, &nominal_def, krate)?, |
@@ -40,13 +40,13 @@ pub(crate) fn goto_implementation( | |||
40 | 40 | ||
41 | fn impls_for_def( | 41 | fn impls_for_def( |
42 | sema: &Semantics<RootDatabase>, | 42 | sema: &Semantics<RootDatabase>, |
43 | node: &ast::AdtDef, | 43 | node: &ast::Adt, |
44 | krate: Crate, | 44 | krate: Crate, |
45 | ) -> Option<Vec<NavigationTarget>> { | 45 | ) -> Option<Vec<NavigationTarget>> { |
46 | let ty = match node { | 46 | let ty = match node { |
47 | ast::AdtDef::Struct(def) => sema.to_def(def)?.ty(sema.db), | 47 | ast::Adt::Struct(def) => sema.to_def(def)?.ty(sema.db), |
48 | ast::AdtDef::Enum(def) => sema.to_def(def)?.ty(sema.db), | 48 | ast::Adt::Enum(def) => sema.to_def(def)?.ty(sema.db), |
49 | ast::AdtDef::Union(def) => sema.to_def(def)?.ty(sema.db), | 49 | ast::Adt::Union(def) => sema.to_def(def)?.ty(sema.db), |
50 | }; | 50 | }; |
51 | 51 | ||
52 | let impls = Impl::all_in_crate(sema.db, krate); | 52 | let impls = Impl::all_in_crate(sema.db, krate); |