Merge #6124
6124: Better normalized crate name usage r=jonas-schievink a=SomeoneToIgnore Closes https://github.com/rust-analyzer/rust-analyzer/issues/5343 Closes https://github.com/rust-analyzer/rust-analyzer/issues/5932 Uses normalized name for code snippets (to be able to test the fix), hover messages and documentation rewrite links (are there any tests for those?). Also renamed the field to better resemble the semantics. Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
use std::{iter, sync::Arc};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use base_db::{CrateId, Edition, FileId};
|
||||
use base_db::{CrateId, CrateName, Edition, FileId};
|
||||
use either::Either;
|
||||
use hir_def::find_path::PrefixKind;
|
||||
use hir_def::{
|
||||
@@ -99,8 +99,8 @@ impl Crate {
|
||||
db.crate_graph()[self.id].edition
|
||||
}
|
||||
|
||||
pub fn display_name(self, db: &dyn HirDatabase) -> Option<String> {
|
||||
db.crate_graph()[self.id].display_name.clone()
|
||||
pub fn declaration_name(self, db: &dyn HirDatabase) -> Option<CrateName> {
|
||||
db.crate_graph()[self.id].declaration_name.clone()
|
||||
}
|
||||
|
||||
pub fn query_external_importables(
|
||||
|
||||
Reference in New Issue
Block a user