mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Add tests of showing function qualifiers
This commit is contained in:
parent
414d8d9c38
commit
b9b342ff93
1 changed files with 25 additions and 0 deletions
|
@ -844,4 +844,29 @@ fn func(foo: i32) { if true { <|>foo; }; }
|
||||||
&["fn foo()\n```\n\n<- `\u{3000}` here"],
|
&["fn foo()\n```\n\n<- `\u{3000}` here"],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_hover_function_show_qualifiers() {
|
||||||
|
check_hover_result(
|
||||||
|
"
|
||||||
|
//- /lib.rs
|
||||||
|
async fn foo<|>() {}
|
||||||
|
",
|
||||||
|
&["async fn foo()"],
|
||||||
|
);
|
||||||
|
check_hover_result(
|
||||||
|
"
|
||||||
|
//- /lib.rs
|
||||||
|
pub const unsafe fn foo<|>() {}
|
||||||
|
",
|
||||||
|
&["pub const unsafe fn foo()"],
|
||||||
|
);
|
||||||
|
check_hover_result(
|
||||||
|
r#"
|
||||||
|
//- /lib.rs
|
||||||
|
pub(crate) async unsafe extern "C" fn foo<|>() {}
|
||||||
|
"#,
|
||||||
|
&[r#"pub(crate) async unsafe extern "C" fn foo()"#],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue