mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
mbe: fix token conversion for doc comments
This commit is contained in:
parent
af3b6a0893
commit
a497e9a05e
2 changed files with 64 additions and 36 deletions
|
@ -850,6 +850,32 @@ fn foo() {}
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_through_included_file_struct_with_doc_comment() {
|
||||
check(
|
||||
r#"
|
||||
//- /main.rs
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! include {}
|
||||
|
||||
include!("foo.rs");
|
||||
|
||||
fn f() {
|
||||
let x = Foo$0;
|
||||
}
|
||||
|
||||
mod confuse_index {
|
||||
pub struct Foo;
|
||||
}
|
||||
|
||||
//- /foo.rs
|
||||
/// This is a doc comment
|
||||
pub struct Foo;
|
||||
//^^^
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_for_type_param() {
|
||||
check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue