aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-10-02 19:16:22 +0100
committerKirill Bulatov <[email protected]>2020-10-02 19:16:22 +0100
commit99952f3be254394a5c70ce8fb8436d76c779ed71 (patch)
tree1dd257a6e3813ff901a9ec70969640d58e90aee6 /crates/project_model
parentcae2e859ffbf2b435c8675838e450b66d4c6153e (diff)
Fix the hover dash issues
Diffstat (limited to 'crates/project_model')
-rw-r--r--crates/project_model/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/project_model/src/lib.rs b/crates/project_model/src/lib.rs
index 258f60e28..d1e7602fc 100644
--- a/crates/project_model/src/lib.rs
+++ b/crates/project_model/src/lib.rs
@@ -411,7 +411,7 @@ impl ProjectWorkspace {
411 let crate_id = crate_graph.add_crate_root( 411 let crate_id = crate_graph.add_crate_root(
412 file_id, 412 file_id,
413 edition, 413 edition,
414 Some(cargo[pkg].name.clone()), 414 Some(CrateName::normalize_dashes(&cargo[pkg].name)),
415 cfg_options, 415 cfg_options,
416 env, 416 env,
417 proc_macro.clone(), 417 proc_macro.clone(),
@@ -546,7 +546,8 @@ fn sysroot_to_crate_graph(
546 546
547 let env = Env::default(); 547 let env = Env::default();
548 let proc_macro = vec![]; 548 let proc_macro = vec![];
549 let name = sysroot[krate].name.clone(); 549 let name = CrateName::new(&sysroot[krate].name)
550 .expect("Sysroot crates' names do not contain dashes");
550 let crate_id = crate_graph.add_crate_root( 551 let crate_id = crate_graph.add_crate_root(
551 file_id, 552 file_id,
552 Edition::Edition2018, 553 Edition::Edition2018,