mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Fix TestDB::module_at_position
with submodules
This commit is contained in:
parent
52585df24a
commit
9e8feeb94a
2 changed files with 72 additions and 2 deletions
|
@ -954,6 +954,29 @@ fn main() {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn from_inside_module() {
|
||||
// This worked correctly, but the test suite logic was broken.
|
||||
cov_mark::check!(submodule_in_testdb);
|
||||
check_found_path(
|
||||
r#"
|
||||
mod baz {
|
||||
pub struct Foo {}
|
||||
}
|
||||
|
||||
mod bar {
|
||||
fn bar() {
|
||||
$0
|
||||
}
|
||||
}
|
||||
"#,
|
||||
"crate::baz::Foo",
|
||||
"crate::baz::Foo",
|
||||
"crate::baz::Foo",
|
||||
"crate::baz::Foo",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn recursive_pub_mod_reexport() {
|
||||
cov_mark::check!(recursive_imports);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue