aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorShotaro Yamada <[email protected]>2020-02-19 04:13:29 +0000
committerShotaro Yamada <[email protected]>2020-02-19 04:13:29 +0000
commitdd0c3c41b927654553fa407fbb654bb3a2c64a48 (patch)
tree6d04ebc534ccfe332a86ad0b76a5f886ec5e6b9e /crates/ra_ide/src
parent20252efb32bfdfe7392934a95a6c6d6b583d10e7 (diff)
Fix a crash with non-ascii whitespace in doc-comments
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/hover.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index 3f88bb260..1de3cb579 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -743,4 +743,21 @@ fn func(foo: i32) { if true { <|>foo; }; }
743 &["u32"], 743 &["u32"],
744 ); 744 );
745 } 745 }
746
747 #[test]
748 fn test_hover_non_ascii_space_doc() {
749 check_hover_result(
750 "
751 //- /lib.rs
752 /// <- `\u{3000}` here
753 fn foo() {
754 }
755
756 fn bar() {
757 fo<|>o();
758 }
759 ",
760 &["fn foo()\n```\n\n<- `\u{3000}` here"],
761 );
762 }
746} 763}