mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 23:24:29 +00:00
Fix test
This commit is contained in:
parent
9d24412929
commit
7054e89d18
2 changed files with 10 additions and 3 deletions
|
@ -8,6 +8,7 @@ use hir_expand::{
|
|||
};
|
||||
use ra_arena::{Arena, Idx, RawId};
|
||||
use ra_syntax::{ast, match_ast};
|
||||
use test_utils::mark;
|
||||
|
||||
use crate::{
|
||||
attr::Attrs,
|
||||
|
@ -693,7 +694,10 @@ impl Ctx {
|
|||
.flat_map(|items| items.0)
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
.unwrap_or_else(|| {
|
||||
mark::hit!(name_res_works_for_broken_modules);
|
||||
Vec::new()
|
||||
}),
|
||||
}
|
||||
};
|
||||
let ast_id = self.source_ast_id_map.ast_id(module);
|
||||
|
|
|
@ -20,8 +20,11 @@ fn name_res_works_for_broken_modules() {
|
|||
",
|
||||
);
|
||||
assert_snapshot!(map, @r###"
|
||||
⋮crate
|
||||
⋮Baz: _
|
||||
crate
|
||||
Baz: _
|
||||
foo: t
|
||||
|
||||
crate::foo
|
||||
"###);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue