From 8efe43245bc64ed27f88c333541b2cb7af2ce44c Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Tue, 3 Nov 2020 10:36:01 +0300 Subject: Remove intra-crate facade from completions --- crates/completion/src/completions.rs | 10 +++++++++- crates/completion/src/render.rs | 16 +++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'crates/completion') 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_; use hir::{ModPath, ScopeDef, Type}; -use crate::{item::Builder, render::*, CompletionContext, CompletionItem}; +use crate::{ + item::Builder, + render::{ + const_::render_const, enum_variant::render_enum_variant, function::render_fn, + macro_::render_macro, render_field, render_resolution, render_tuple_field, + type_alias::render_type_alias, RenderContext, + }, + CompletionContext, CompletionItem, +}; /// Represents an in-progress set of completions being built. #[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 @@ //! `render` module provides utilities for rendering completion suggestions //! into code pieces that will be presented to user. -mod macro_; -mod function; +pub(crate) mod macro_; +pub(crate) mod function; +pub(crate) mod enum_variant; +pub(crate) mod const_; +pub(crate) mod type_alias; + mod builder_ext; -mod enum_variant; -mod const_; -mod type_alias; use hir::{Documentation, HasAttrs, HirDisplay, Mutability, ScopeDef, Type}; use ide_db::RootDatabase; @@ -18,10 +19,7 @@ use crate::{ CompletionScore, }; -pub(crate) use crate::render::{ - const_::render_const, enum_variant::render_enum_variant, function::render_fn, - macro_::render_macro, type_alias::render_type_alias, -}; +use crate::render::{enum_variant::render_enum_variant, function::render_fn, macro_::render_macro}; pub(crate) fn render_field<'a>( ctx: RenderContext<'a>, -- cgit v1.2.3