This commit is contained in:
Jonas Schievink 2020-06-15 19:16:29 +02:00
parent 9d24412929
commit 7054e89d18
2 changed files with 10 additions and 3 deletions

View File

@ -8,6 +8,7 @@ use hir_expand::{
}; };
use ra_arena::{Arena, Idx, RawId}; use ra_arena::{Arena, Idx, RawId};
use ra_syntax::{ast, match_ast}; use ra_syntax::{ast, match_ast};
use test_utils::mark;
use crate::{ use crate::{
attr::Attrs, attr::Attrs,
@ -693,7 +694,10 @@ impl Ctx {
.flat_map(|items| items.0) .flat_map(|items| items.0)
.collect() .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); let ast_id = self.source_ast_id_map.ast_id(module);

View File

@ -20,8 +20,11 @@ fn name_res_works_for_broken_modules() {
", ",
); );
assert_snapshot!(map, @r###" assert_snapshot!(map, @r###"
crate crate
Baz: _ Baz: _
foo: t
crate::foo
"###); "###);
} }