mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
fix: Fix modules in blocks not resolving in ide layer
This commit is contained in:
parent
5346002d07
commit
91554e0ae7
11 changed files with 183 additions and 33 deletions
|
@ -993,10 +993,6 @@ pub struct Struct;
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(
|
||||
not(all(unix, target_pointer_width = "64")),
|
||||
ignore = "depends on `DefaultHasher` outputs"
|
||||
)]
|
||||
fn test_rainbow_highlighting() {
|
||||
check_highlighting(
|
||||
r#"
|
||||
|
@ -1018,6 +1014,35 @@ fn bar() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_block_mod_items() {
|
||||
check_highlighting(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($foo:ident) => {
|
||||
mod y {
|
||||
struct $foo;
|
||||
}
|
||||
};
|
||||
}
|
||||
fn main() {
|
||||
foo!(Foo);
|
||||
mod module {
|
||||
// FIXME: IDE layer has this unresolved
|
||||
foo!(Bar);
|
||||
fn func() {
|
||||
mod inner {
|
||||
struct Innerest<const C: usize> { field: [(); {C}] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
expect_file!["./test_data/highlight_block_mod_items.html"],
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ranges() {
|
||||
let (analysis, file_id) = fixture::file(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue