Faulty doctest detection under #[doc] generated OUTER_BLOCK_DOC
#107994
Labels
C-bug
Category: This is a bug.
OUTER_BLOCK_DOC
#107994
I've noticed
cargo test
failing in certain scenarios when using a#[doc]
attribute to generate a multi-line rustdoc documentation of some type. I've succeeded to reproduce this issue at the playground on a small example.I tried to run
cargo test
on this code (Link to Playground):I expected to see this happen:
cargo test
passes, no errors detected.Instead, this happened: A doctest was detected, and failed with the following error:
Meta
The same behavior can be observed in stable (
1.67.1
), beta (1.68.0-beta.4 (2023-02-09 a6d8057f098ab3cebe5a)
), and nightly (1.69.0-nightly (2023-02-12 5b8f284536d00ba649ca)
) channels within the rust playground.I've also observed that this error does not occur in some previous releases, for example:
The text was updated successfully, but these errors were encountered: