mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-03 18:43:38 +00:00
Add tests of showing function qualifiers
This commit is contained in:
parent
414d8d9c38
commit
b9b342ff93
@ -844,4 +844,29 @@ fn func(foo: i32) { if true { <|>foo; }; }
|
||||
&["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…
Reference in New Issue
Block a user