diff options
author | Paul Daniel Faria <[email protected]> | 2020-06-23 03:28:09 +0100 |
---|---|---|
committer | Paul Daniel Faria <[email protected]> | 2020-06-23 03:29:08 +0100 |
commit | 0b971625c389c1638957b010a35c7bb1a6bd69b9 (patch) | |
tree | c6efdc103468ee72475c7f9b10902f15df6522fd /crates/ra_ide/src/syntax_highlighting/tests.rs | |
parent | d8842e89e9053b62c081d2995cbf43b8fd5c51b2 (diff) |
Fix underflow panic when doctests are at top of file
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/tests.rs')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/tests.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs index 93a276ffe..b1f48f03b 100644 --- a/crates/ra_ide/src/syntax_highlighting/tests.rs +++ b/crates/ra_ide/src/syntax_highlighting/tests.rs | |||
@@ -291,6 +291,9 @@ fn main() { | |||
291 | fn test_highlight_doctest() { | 291 | fn test_highlight_doctest() { |
292 | check_highlighting( | 292 | check_highlighting( |
293 | r#" | 293 | r#" |
294 | /// ``` | ||
295 | /// let _ = "early doctests should not go boom"; | ||
296 | /// ``` | ||
294 | struct Foo { | 297 | struct Foo { |
295 | bar: bool, | 298 | bar: bool, |
296 | } | 299 | } |