Skip to content

Regression in doctest compile_fail detection with global_asm! #140412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ehuss opened this issue Apr 28, 2025 · 0 comments · May be fixed by #140420
Open

Regression in doctest compile_fail detection with global_asm! #140412

ehuss opened this issue Apr 28, 2025 · 0 comments · May be fixed by #140420
Assignees
Labels
A-doctests Area: Documentation tests, run by rustdoc C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@ehuss
Copy link
Contributor

ehuss commented Apr 28, 2025

```rust,compile_fail
fn main() {}
core::arch::global_asm!("", in(reg) 5);
```

I expected to see this happen: This should pass rustdoc --test because the example generates an error the `in` operand cannot be used with `global_asm!`

Instead, this happened: This fails with rustdoc --test because the example is erroneously being treated as compiling successfully.

This appears to be a regression due to #140220
cc @GuillaumeGomez

Meta

rustc --version --verbose:

rustc 1.88.0-nightly (25cdf1f67 2025-04-28)
binary: rustc
commit-hash: 25cdf1f67463c9365d8d83778c933ec7480e940b
commit-date: 2025-04-28
host: x86_64-apple-darwin
release: 1.88.0-nightly
LLVM version: 20.1.2
@ehuss ehuss added C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 28, 2025
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 28, 2025
@fmease fmease self-assigned this Apr 28, 2025
@fmease fmease added A-doctests Area: Documentation tests, run by rustdoc and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 28, 2025
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants