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
Doctests as tests: should_panic examples and cfg-gated/split-doc edge cases still refuse or over-credit #8639
Functions gated by feature / platform cfg / cfg(not(doctest)) register their doc examples like an ordinary #[test], though the doctest may not run in the default configuration (false-clean risk).
/** */ block docs and a multi-line cfg_attr(..., doc = ...) above a /// run can still split one item's document, which the single-document rule is meant to refuse.
Visibility of enclosing modules is not checked: a pub fn inside a private mod is still treated as a doctest subject.
Display name omits the module path (<path> - <item> (line N)), so two same-named items in one file are told apart only by line.
Indentation common to every doc line, and unclosed fences, are refused rather than parsed; a moved [lib] path loses doctest evidence.
Goal hurt: trustworthy verdicts (2, 3, 4 are false-credit risks; 1, 5, 6 are missed credit).
Owner: analysis / test discovery (crates/ripr/src/analysis/facts/doctests.rs). A duplicate search for should_panic / doctest / cfg found nothing equivalent.
Activity
EffortlessSteven commentedon Nov 1, 2026
Claim: wave-9A ITEM 4 — refuse cfg-gated doc examples and
#![cfg(..)]files in doctest registration (#8639 item 2).State: implementing on branch
cursor/doctest-cfg-gated-6c97.Files:
crates/ripr/src/analysis/facts/doctests.rs,doctests/tests.rs,changelog.d/8639-doctest-cfg-gated.md.EffortlessSteven commentedon Nov 1, 2026
State: PR #12029 open at
2be4842f93— implementation + tests complete; awaitingmerge-readylabel (agent 403) andRipr Rust Small Resulton that head.fix(facts): inner cfg_attr headers do not gate doctests; restore doc …
test(corpus): accept hex-from-hex-odd-variant missed credit from cfg-…
fix(facts): spaced doc attributes share the document, inner cfg_attr(…
fix(facts): refuse cfg-gated doc examples for doctest registration (#…
fix(facts): credit a doctest on an item gated by a default-on cargo f…
fix(facts): credit a doctest on an item gated by a default-on cargo f…
fix(facts): credit a doctest on an item gated by a default-on cargo f…
fix(facts): credit a doctest on an item gated by a default-on cargo f…