mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Test inner and outer doc comments in hover
This commit is contained in:
parent
f8823e8cbc
commit
da3b5e35a6
@ -3357,4 +3357,66 @@ impl Foo {
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_doc_outer_inner() {
|
||||
check(
|
||||
r#"
|
||||
/// Be quick;
|
||||
mod Foo<|> {
|
||||
//! time is mana
|
||||
|
||||
/// This comment belongs to the function
|
||||
fn foo() {}
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
*Foo*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
mod Foo
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Be quick;
|
||||
time is mana
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_doc_outer_inner_attribue() {
|
||||
check(
|
||||
r#"
|
||||
#[doc = "Be quick;"]
|
||||
mod Foo<|> {
|
||||
#![doc = "time is mana"]
|
||||
|
||||
#[doc = "This comment belongs to the function"]
|
||||
fn foo() {}
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
*Foo*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
mod Foo
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Be quick;
|
||||
time is mana
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user