From 4e76e884bd74430223919f29d49d7ae9710b48cf Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Thu, 22 Oct 2020 20:43:07 -0700 Subject: correct hover for items with doc attribute with raw strings --- crates/ide/src/hover.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'crates/ide') diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index 6466422c5..508e8af20 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs @@ -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 -- cgit v1.2.3