Make ModPath's representation private

This commit is contained in:
Jonas Schievink 2021-02-04 20:49:24 +01:00
parent 36191543a6
commit 5d99ba1d9a
18 changed files with 70 additions and 51 deletions

View file

@ -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;