mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Make ModPath
's representation private
This commit is contained in:
parent
36191543a6
commit
5d99ba1d9a
18 changed files with 70 additions and 51 deletions
|
@ -57,7 +57,7 @@ pub(crate) fn render_resolution_with_import<'a>(
|
|||
ScopeDef::ModuleDef(ModuleDef::Function(f)) => f.name(ctx.completion.db).to_string(),
|
||||
ScopeDef::ModuleDef(ModuleDef::Const(c)) => c.name(ctx.completion.db)?.to_string(),
|
||||
ScopeDef::ModuleDef(ModuleDef::TypeAlias(t)) => t.name(ctx.completion.db).to_string(),
|
||||
_ => import_edit.import_path.segments.last()?.to_string(),
|
||||
_ => import_edit.import_path.segments().last()?.to_string(),
|
||||
};
|
||||
Render::new(ctx).render_resolution(local_name, Some(import_edit), resolution).map(|mut item| {
|
||||
item.completion_kind = CompletionKind::Magic;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue