Account for ///
when rendering multiline spans
Don't consider `///` and `//!` docstrings to be empty for the purposes of multiline span rendering.
This commit is contained in:
parent
ad82d9f698
commit
9f1044ef76
18 changed files with 144 additions and 43 deletions
|
@ -3,6 +3,7 @@ error: unknown attribute `compile-fail`
|
|||
|
|
||||
LL | / /// foo
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -19,6 +20,7 @@ error: unknown attribute `compilefail`
|
|||
|
|
||||
LL | / /// foo
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -30,6 +32,7 @@ error: unknown attribute `comPile_fail`
|
|||
|
|
||||
LL | / /// foo
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -41,6 +44,7 @@ error: unknown attribute `should-panic`
|
|||
|
|
||||
LL | / /// bar
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -52,6 +56,7 @@ error: unknown attribute `shouldpanic`
|
|||
|
|
||||
LL | / /// bar
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -63,6 +68,7 @@ error: unknown attribute `sHould_panic`
|
|||
|
|
||||
LL | / /// bar
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -74,6 +80,7 @@ error: unknown attribute `no-run`
|
|||
|
|
||||
LL | / /// foobar
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -85,6 +92,7 @@ error: unknown attribute `norun`
|
|||
|
|
||||
LL | / /// foobar
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -96,6 +104,7 @@ error: unknown attribute `no_Run`
|
|||
|
|
||||
LL | / /// foobar
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -107,6 +116,7 @@ error: unknown attribute `test-harness`
|
|||
|
|
||||
LL | / /// b
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -118,6 +128,7 @@ error: unknown attribute `testharness`
|
|||
|
|
||||
LL | / /// b
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -129,6 +140,7 @@ error: unknown attribute `teSt_harness`
|
|||
|
|
||||
LL | / /// b
|
||||
... |
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -139,7 +151,10 @@ error: unknown attribute `rust2018`
|
|||
--> $DIR/check-attr.rs:43:1
|
||||
|
|
||||
LL | / /// b
|
||||
... |
|
||||
LL | |
|
||||
LL | | ///
|
||||
LL | | /// ```rust2018
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -149,7 +164,11 @@ error: unknown attribute `rust2018`
|
|||
--> $DIR/check-attr.rs:51:1
|
||||
|
|
||||
LL | / /// b
|
||||
... |
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | ///
|
||||
LL | | /// ```rust2018 shouldpanic
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -159,7 +178,11 @@ error: unknown attribute `shouldpanic`
|
|||
--> $DIR/check-attr.rs:51:1
|
||||
|
|
||||
LL | / /// b
|
||||
... |
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | ///
|
||||
LL | | /// ```rust2018 shouldpanic
|
||||
LL | | /// boo
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
|
|
@ -26,7 +26,8 @@ error: unknown attribute `testharness`
|
|||
--> $DIR/check-fail.rs:8:1
|
||||
|
|
||||
LL | / //! ```rust,testharness
|
||||
... |
|
||||
LL | |
|
||||
LL | | //! let x = 12;
|
||||
LL | | //! ```
|
||||
| |_______^
|
||||
|
|
||||
|
@ -43,7 +44,10 @@ error: unknown attribute `testharness`
|
|||
--> $DIR/check-fail.rs:17:1
|
||||
|
|
||||
LL | / /// hello
|
||||
... |
|
||||
LL | |
|
||||
LL | | ///
|
||||
LL | | /// ```rust,testharness
|
||||
LL | | /// let x = 12;
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
|
|
@ -14,7 +14,9 @@ error: documentation test in private item
|
|||
--> $DIR/lint-group.rs:22:1
|
||||
|
|
||||
LL | / /// wait, this *does* have a doctest?
|
||||
... |
|
||||
LL | | ///
|
||||
LL | | /// ```
|
||||
LL | | /// println!("sup");
|
||||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue