-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustdoc: doctest-xcompile passes when it shouldn't #139924
Copy link
Copy link
Open
Labels
A-crossArea: Cross compilationArea: Cross compilationA-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
A-crossArea: Cross compilationArea: Cross compilationA-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status
In the following example, both doctests pass, even though they are identical except for the annotation (one of them is
no_run, the othercompile_fail).Command to run:
cargo test --doc -Zdoctest-xcompile -Zbuild-std=core,panic_abort --target riscv32imac-unknown-none-elfSince the no_run test case compiles, I would expect the compile_fail example to fail. I can only trigger this behaviour if I reference
esp_hal- I'm not sure if other third party dependencies would trigger it. Without the external dependency, the annotation works as expected.