Closed
Description
Doc test with missing closing back quotes fail without any explanation.
///```rust
/// let x = 7;
/// assert_eq!(x, a());
/// // <- HERE
///```rust
/// let x = 6;
/// assert_ne!(x, a());
///```
fn a() -> i32 {
7
}
cargo test
:
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Doc-tests temp
running 1 test
test src/lib.rs - a (line 1) ... FAILEDfailures:
failures:
src/lib.rs - a (line 1)test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--doc'
Expected outcome: error while compiling the tests.
tested versions:
rustc --version --verbose
rustc 1.35.0-nightly (cb2f34dc6 2019-03-22)
binary: rustc
commit-hash: cb2f34dc6d7e83d8bcfef79e0388d49f0c24aca7
commit-date: 2019-03-22
host: x86_64-unknown-linux-gnu
release: 1.35.0-nightly
LLVM version: 8.0
rustc 1.33.0 (2aa4c46cf 2019-02-28)
binary: rustc
commit-hash: 2aa4c46cfdd726e97360c2734835aa3515e8c858
commit-date: 2019-02-28
host: x86_64-unknown-linux-gnu
release: 1.33.0
LLVM version: 8.0