mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
fix: doc url link type
This commit is contained in:
parent
0ee4e6a22d
commit
5f4351fbb6
4 changed files with 82 additions and 33 deletions
|
@ -3641,6 +3641,40 @@ mod return_keyword {}
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_keyword_doc() {
|
||||
check(
|
||||
r#"
|
||||
//- /main.rs crate:main deps:std
|
||||
fn foo() {
|
||||
let bar = mov$0e || {};
|
||||
}
|
||||
//- /libstd.rs crate:std
|
||||
#[doc(keyword = "move")]
|
||||
/// [closure]
|
||||
/// [closures][closure]
|
||||
/// [threads]
|
||||
///
|
||||
/// [closure]: ../book/ch13-01-closures.html
|
||||
/// [threads]: ../book/ch16-01-threads.html#using-move-closures-with-threads
|
||||
mod move_keyword {}
|
||||
"#,
|
||||
expect
|
||||
[closures](https://doc.rust-lang.org/nightly/book/ch13-01-closures.html)
|
||||
[threads](https://doc.rust-lang.org/nightly/book/ch16-01-threads.html#using-move-closures-with-threads)
|
||||
"##]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_keyword_as_primitive() {
|
||||
check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue