You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given multi-line doc-comments (/** */), indented one or more levels, the second paragraph is parsed as code.
With the following code:
/** Summary a b */fnf(){}
I get the following output from cargo test (standard output only):
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
running 1 test
test src/lib.rs - f (line 4) ... FAILED
failures:
---- src/lib.rs - f (line 4) stdout ----
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `b`
--> src/lib.rs:5:3
|
3 | a b
| ^ expected one of 8 possible tokens
error: aborting due to previous error
Couldn't compile the test.
failures:
src/lib.rs - f (line 4)
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
This only occurs with indented, multi-line doc-comments that have at least two paragraphs separated by a blank line.
This occurs on both stable and nightly.
The text was updated successfully, but these errors were encountered:
This is the intended behavior. In markdown (the syntax used in doc comments) an indentation of 4 spaces marks a code block, similar to the three-backtick-block. If you don't provide a source language (you cannot for indented blocks), rustdoc interprets it as Rust source code and hence compiles and tests it.
Given multi-line doc-comments (
/** */
), indented one or more levels, the second paragraph is parsed as code.With the following code:
I get the following output from
cargo test
(standard output only):This only occurs with indented, multi-line doc-comments that have at least two paragraphs separated by a blank line.
This occurs on both stable and nightly.
The text was updated successfully, but these errors were encountered: