mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 07:37:30 +00:00
Fix the hover dash issues
This commit is contained in:
parent
cae2e859ff
commit
99952f3be2
4 changed files with 10 additions and 9 deletions
|
@ -411,7 +411,7 @@ impl ProjectWorkspace {
|
|||
let crate_id = crate_graph.add_crate_root(
|
||||
file_id,
|
||||
edition,
|
||||
Some(cargo[pkg].name.clone()),
|
||||
Some(CrateName::normalize_dashes(&cargo[pkg].name)),
|
||||
cfg_options,
|
||||
env,
|
||||
proc_macro.clone(),
|
||||
|
@ -546,7 +546,8 @@ fn sysroot_to_crate_graph(
|
|||
|
||||
let env = Env::default();
|
||||
let proc_macro = vec![];
|
||||
let name = sysroot[krate].name.clone();
|
||||
let name = CrateName::new(&sysroot[krate].name)
|
||||
.expect("Sysroot crates' names do not contain dashes");
|
||||
let crate_id = crate_graph.add_crate_root(
|
||||
file_id,
|
||||
Edition::Edition2018,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue