mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Fix crate display name dashes
This commit is contained in:
parent
6bc226fa19
commit
059ed25a3e
6 changed files with 40 additions and 20 deletions
|
@ -245,7 +245,10 @@ impl ProjectWorkspace {
|
|||
let crate_id = crate_graph.add_crate_root(
|
||||
file_id,
|
||||
Edition::Edition2018,
|
||||
Some(krate.name(&sysroot).to_string()),
|
||||
Some(
|
||||
CrateName::new(krate.name(&sysroot))
|
||||
.expect("Sysroot crate names should not contain dashes"),
|
||||
),
|
||||
cfg_options,
|
||||
env,
|
||||
extern_source,
|
||||
|
@ -296,7 +299,7 @@ impl ProjectWorkspace {
|
|||
let crate_id = crate_graph.add_crate_root(
|
||||
file_id,
|
||||
edition,
|
||||
Some(pkg.name(&cargo).to_string()),
|
||||
Some(CrateName::normalize_dashes(pkg.name(&cargo))),
|
||||
cfg_options,
|
||||
env,
|
||||
extern_source,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue