Closed
Description
I tried this code:
t.rs:
/// Fungle the foople.
/// ```
/// t::foople();
/// ```
pub fn foople() {}
/// Flomble the florp
/// ```
/// t::florp();
/// ```
pub fn florp() {}
mkdir doctests
rustc +nightly --crate-type rlib t.rs
rustdoc +nightly -Zunstable-options --test --persist-doctests doctests --no-run --extern t=libt.rlib t.rs
ls -lR doctests/*/*
Without --no-run
, this generates (and runs) executables:
-rwxrwxr-x. 1 jsgf jsgf 3385848 Aug 17 00:50 doctests/t_rs_2_0/rust_out
-rwxrwxr-x. 1 jsgf jsgf 3385840 Aug 17 00:50 doctests/t_rs_8_0/rust_out
I'd expect the same with --no-run
.
Instead, with --no-run
I get empty non-executable files:
-rw-rw-r--. 1 jsgf jsgf 0 Aug 17 00:51 doctests/t_rs_2_0/rust_out
-rw-rw-r--. 1 jsgf jsgf 0 Aug 17 00:51 doctests/t_rs_8_0/rust_out
Meta
rustc --version --verbose
:
rustc 1.56.0-nightly (2d2bc94c8 2021-08-15)
binary: rustc
commit-hash: 2d2bc94c8c3aa778e191f80261c726e4777439f1
commit-date: 2021-08-15
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 12.0.1