mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +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
|
@ -64,7 +64,9 @@ fn with_single_file(db: &mut dyn SourceDatabaseExt, ra_fixture: &str) -> FileId
|
|||
crate_graph.add_crate_root(
|
||||
file_id,
|
||||
meta.edition,
|
||||
meta.krate,
|
||||
meta.krate.map(|name| {
|
||||
CrateName::new(&name).expect("Fixture crate name should not contain dashes")
|
||||
}),
|
||||
meta.cfg,
|
||||
meta.env,
|
||||
Default::default(),
|
||||
|
@ -124,7 +126,7 @@ fn with_files(db: &mut dyn SourceDatabaseExt, fixture: &str) -> Option<FilePosit
|
|||
let crate_id = crate_graph.add_crate_root(
|
||||
file_id,
|
||||
meta.edition,
|
||||
Some(krate.clone()),
|
||||
Some(CrateName::new(&krate).unwrap()),
|
||||
meta.cfg,
|
||||
meta.env,
|
||||
Default::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue