[rustdoc] Do not take doc(cfg()) into account when filtering doctests#159014
[rustdoc] Do not take doc(cfg()) into account when filtering doctests#159014GuillaumeGomez wants to merge 3 commits into
doc(cfg()) into account when filtering doctests#159014Conversation
This comment has been minimized.
This comment has been minimized.
|
And now it fails because we (doc) inlined some functions. Fixing that then. :) |
This comment has been minimized.
This comment has been minimized.
f5059c8 to
062cfea
Compare
This comment has been minimized.
This comment has been minimized.
062cfea to
1d5692c
Compare
|
Fixed CI \o/ |
There was a problem hiding this comment.
I've only skimmed this function, so I'm wondering whether your added include_doc_cfg: bool parameter also accounts for inherited doc-cfgs. Like, do we still consider the doctest untestable and skip it in the code below?
#![feature(doc_cfg)]
#[doc(cfg(false))]
mod dummy {
/// ```
/// ```
fn f() {}
}There was a problem hiding this comment.
Damn, that's a good take. Ok, new approach: writing up a new function and stop using stuff we shouldn't. :)
1d5692c to
a0bf3c9
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Reverted changes I made to |
This comment has been minimized.
This comment has been minimized.
|
Ah, new stuff gets added. |
a0bf3c9 to
59a72c3
Compare
|
cc @Amanieu, @folkertdev, @sayantn |
59a72c3 to
885af7e
Compare
This comment has been minimized.
This comment has been minimized.
885af7e to
21e8051
Compare
Part of #147033.
Because it was using the
extract_cfg_from_attrscommon function, it was taking into account thedoc(cfg())attributes the same as if they were acfg.I didn't mark this PR as "fix" because I didn't handle the case of the doctest not being marked as ignored because I'm not sure if we should revisit the fact that we ignore these doctests or if we should just mark them as ignored (because of
target_feature(enable = "...")).Setting @fmease as reviewer as they are likely the only one with context about this issue. 😆
r? @fmease