correct hover for items with doc attribute with raw strings

This commit is contained in:
Josh Mcguigan 2020-10-22 20:43:07 -07:00
parent 8b3c851dd3
commit 4e76e884bd
2 changed files with 38 additions and 3 deletions

View file

@ -637,6 +637,33 @@ fn main() { }
);
}
#[test]
fn hover_shows_fn_doc_attr_raw_string() {
check(
r##"
#[doc = r#"Raw string doc attr"#]
pub fn foo<|>(_: &Path) {}
fn main() { }
"##,
expect![[r##"
*foo*
```rust
test
```
```rust
pub fn foo(_: &Path)
```
---
Raw string doc attr
"##]],
);
}
#[test]
fn hover_shows_struct_field_info() {
// Hovering over the field when instantiating