mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
fix odrer-of-iteration bug in tests
This commit is contained in:
parent
772311392f
commit
908c9589a8
2 changed files with 15 additions and 7 deletions
|
@ -236,7 +236,7 @@ impl MockDatabase {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct CrateGraphFixture(pub FxHashMap<String, (String, Edition, Vec<String>)>);
|
||||
pub struct CrateGraphFixture(pub Vec<(String, (String, Edition, Vec<String>))>);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! crate_graph {
|
||||
|
@ -246,10 +246,10 @@ macro_rules! crate_graph {
|
|||
#[allow(unused_mut, unused_assignments)]
|
||||
let mut edition = ra_db::Edition::Edition2018;
|
||||
$(edition = ra_db::Edition::from_string($edition);)?
|
||||
res.0.insert(
|
||||
res.0.push((
|
||||
$crate_name.to_string(),
|
||||
($crate_path.to_string(), edition, vec![$($dep.to_string()),*])
|
||||
);
|
||||
));
|
||||
)*
|
||||
res
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue