mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix: Fix ast-id up when merging raw attributes
This commit is contained in:
parent
ec3586eab9
commit
618cfd792c
6 changed files with 167 additions and 10 deletions
|
@ -914,6 +914,48 @@ fn main() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mod_hl_injection() {
|
||||
check_highlighting(
|
||||
r##"
|
||||
//- /foo.rs
|
||||
//! [Struct]
|
||||
//! This is an intra doc injection test for modules
|
||||
//! [Struct]
|
||||
//! This is an intra doc injection test for modules
|
||||
|
||||
pub struct Struct;
|
||||
//- /lib.rs crate:foo
|
||||
/// [crate::foo::Struct]
|
||||
/// This is an intra doc injection test for modules
|
||||
/// [crate::foo::Struct]
|
||||
/// This is an intra doc injection test for modules
|
||||
mod foo;
|
||||
"##,
|
||||
expect_file!["./test_data/highlight_module_docs_inline.html"],
|
||||
false,
|
||||
);
|
||||
check_highlighting(
|
||||
r##"
|
||||
//- /lib.rs crate:foo
|
||||
/// [crate::foo::Struct]
|
||||
/// This is an intra doc injection test for modules
|
||||
/// [crate::foo::Struct]
|
||||
/// This is an intra doc injection test for modules
|
||||
mod foo;
|
||||
//- /foo.rs
|
||||
//! [Struct]
|
||||
//! This is an intra doc injection test for modules
|
||||
//! [Struct]
|
||||
//! This is an intra doc injection test for modules
|
||||
|
||||
pub struct Struct;
|
||||
"##,
|
||||
expect_file!["./test_data/highlight_module_docs_outline.html"],
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(
|
||||
all(unix, not(target_pointer_width = "64")),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue