diff options
author | Igor Aleksanov <[email protected]> | 2020-11-03 07:36:01 +0000 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-11-03 07:36:01 +0000 |
commit | 8efe43245bc64ed27f88c333541b2cb7af2ce44c (patch) | |
tree | 9685d2d19fd8afed8c66b2005c91d071d88b8f5f /crates/completion | |
parent | 4d333ebb6372c135e5a723da899528cc22d07faa (diff) |
Remove intra-crate facade from completions
Diffstat (limited to 'crates/completion')
-rw-r--r-- | crates/completion/src/completions.rs | 10 | ||||
-rw-r--r-- | crates/completion/src/render.rs | 16 |
2 files changed, 16 insertions, 10 deletions
diff --git a/crates/completion/src/completions.rs b/crates/completion/src/completions.rs index 162d567d9..75dbb1a23 100644 --- a/crates/completion/src/completions.rs +++ b/crates/completion/src/completions.rs | |||
@@ -16,7 +16,15 @@ pub(crate) mod mod_; | |||
16 | 16 | ||
17 | use hir::{ModPath, ScopeDef, Type}; | 17 | use hir::{ModPath, ScopeDef, Type}; |
18 | 18 | ||
19 | use crate::{item::Builder, render::*, CompletionContext, CompletionItem}; | 19 | use crate::{ |
20 | item::Builder, | ||
21 | render::{ | ||
22 | const_::render_const, enum_variant::render_enum_variant, function::render_fn, | ||
23 | macro_::render_macro, render_field, render_resolution, render_tuple_field, | ||
24 | type_alias::render_type_alias, RenderContext, | ||
25 | }, | ||
26 | CompletionContext, CompletionItem, | ||
27 | }; | ||
20 | 28 | ||
21 | /// Represents an in-progress set of completions being built. | 29 | /// Represents an in-progress set of completions being built. |
22 | #[derive(Debug, Default)] | 30 | #[derive(Debug, Default)] |
diff --git a/crates/completion/src/render.rs b/crates/completion/src/render.rs index b54241d51..1fa02c375 100644 --- a/crates/completion/src/render.rs +++ b/crates/completion/src/render.rs | |||
@@ -1,12 +1,13 @@ | |||
1 | //! `render` module provides utilities for rendering completion suggestions | 1 | //! `render` module provides utilities for rendering completion suggestions |
2 | //! into code pieces that will be presented to user. | 2 | //! into code pieces that will be presented to user. |
3 | 3 | ||
4 | mod macro_; | 4 | pub(crate) mod macro_; |
5 | mod function; | 5 | pub(crate) mod function; |
6 | pub(crate) mod enum_variant; | ||
7 | pub(crate) mod const_; | ||
8 | pub(crate) mod type_alias; | ||
9 | |||
6 | mod builder_ext; | 10 | mod builder_ext; |
7 | mod enum_variant; | ||
8 | mod const_; | ||
9 | mod type_alias; | ||
10 | 11 | ||
11 | use hir::{Documentation, HasAttrs, HirDisplay, Mutability, ScopeDef, Type}; | 12 | use hir::{Documentation, HasAttrs, HirDisplay, Mutability, ScopeDef, Type}; |
12 | use ide_db::RootDatabase; | 13 | use ide_db::RootDatabase; |
@@ -18,10 +19,7 @@ use crate::{ | |||
18 | CompletionScore, | 19 | CompletionScore, |
19 | }; | 20 | }; |
20 | 21 | ||
21 | pub(crate) use crate::render::{ | 22 | use crate::render::{enum_variant::render_enum_variant, function::render_fn, macro_::render_macro}; |
22 | const_::render_const, enum_variant::render_enum_variant, function::render_fn, | ||
23 | macro_::render_macro, type_alias::render_type_alias, | ||
24 | }; | ||
25 | 23 | ||
26 | pub(crate) fn render_field<'a>( | 24 | pub(crate) fn render_field<'a>( |
27 | ctx: RenderContext<'a>, | 25 | ctx: RenderContext<'a>, |