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
{{ message }}
Repository navigation
rustdoc doesn't execute documentation tests for #[target_feature] functions #49723
I wonder if it has to do with #49225? I checked the sample with the nightlies that were made right before and after the change. The previous nightly finds the test, the next nightly does not:
$ rustdoc +nightly-2018-03-21 --test h.rsrunning 1 testtest h.rs - foo (line 7) ... FAILEDfailures:---- h.rs - foo (line 7) stdout ---- thread 'rustc' panicked at 'test executable failed:thread 'main' panicked at 'assertion failed: false', h.rs:3:1note: Run with `RUST_BACKTRACE=1` for a backtrace.', librustdoc/test.rs:331:17note: Run with `RUST_BACKTRACE=1` for a backtrace.failures: h.rs - foo (line 7)test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
$ rustdoc +nightly-2018-03-24 --test h.rsrunning 0 teststest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
@QuietMisdreavus can we revert the part of #48759 that adds doc(cfg) from #[target_feature] ? It is not working properly and it is at least unclear to me what the default behavior for this should be at this point. Not doing anything about it allows people to do whatever they want. Figuring a good default and coming at a working implementation might be easier if we have a body of working doc tests that can be studied.
After some conversations on IRC, we discovered that rustdoc doesn't add target features to the configuration environment when extracting and running doctests. I've opened #49864 to fix this.
Activity
QuietMisdreavus commentedon Apr 6, 2018
I wonder if it has to do with #49225? I checked the sample with the nightlies that were made right before and after the change. The previous nightly finds the test, the next nightly does not:
QuietMisdreavus commentedon Apr 6, 2018
Oh wait, it's not that change, it's #48759 - it dynamically adds
doc(cfg)flags to the item, which rustdoc reads before executing the doctests.gnzlbg commentedon Apr 10, 2018
@QuietMisdreavus can we revert the part of #48759 that adds
doc(cfg)from#[target_feature]? It is not working properly and it is at least unclear to me what the default behavior for this should be at this point. Not doing anything about it allows people to do whatever they want. Figuring a good default and coming at a working implementation might be easier if we have a body of working doc tests that can be studied.QuietMisdreavus commentedon Apr 11, 2018
After some conversations on IRC, we discovered that rustdoc doesn't add target features to the configuration environment when extracting and running doctests. I've opened #49864 to fix this.
Rollup merge of rust-lang#49864 - QuietMisdreavus:doctest-target-feat…