mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Extract the import code into the shared module
This commit is contained in:
parent
0993f9067c
commit
f4ae3650d8
30 changed files with 298 additions and 254 deletions
|
@ -1,7 +1,7 @@
|
|||
//! Renderer for `enum` variants.
|
||||
|
||||
use assists::utils::{ImportScope, MergeBehaviour};
|
||||
use hir::{HasAttrs, HirDisplay, ModPath, StructKind};
|
||||
use ide_helpers::insert_use::{ImportScope, MergeBehaviour};
|
||||
use itertools::Itertools;
|
||||
use test_utils::mark;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! Renderer for function calls.
|
||||
|
||||
use assists::utils::{ImportScope, MergeBehaviour};
|
||||
use hir::{HasSource, ModPath, Type};
|
||||
use ide_helpers::insert_use::{ImportScope, MergeBehaviour};
|
||||
use syntax::{ast::Fn, display::function_declaration};
|
||||
|
||||
use crate::{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! Renderer for macro invocations.
|
||||
|
||||
use assists::utils::{ImportScope, MergeBehaviour};
|
||||
use hir::{Documentation, HasSource, ModPath};
|
||||
use ide_helpers::insert_use::{ImportScope, MergeBehaviour};
|
||||
use syntax::display::macro_label;
|
||||
use test_utils::mark;
|
||||
|
||||
|
@ -12,6 +12,7 @@ use crate::{
|
|||
|
||||
pub(crate) fn render_macro<'a>(
|
||||
ctx: RenderContext<'a>,
|
||||
// TODO kb add some object instead of a tuple?
|
||||
import_data: Option<(ModPath, ImportScope, Option<MergeBehaviour>)>,
|
||||
name: String,
|
||||
macro_: hir::MacroDef,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue