rustdoc query cycle regression
Open
Nobody has claimed this yet.
A-const-generics
C-bug
F-generic_const_exprs
I-cycle
T-compiler
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I believe this caused a regression on nightly. See https://github.com/aya-rs/aya/actions/runs/15223453504/job/42822502727.
Documenting aya-log-ebpf v0.1.1 (/home/runner/work/aya/aya/ebpf/aya-log-ebpf)
error[E0391]: cycle detected when computing revealed normalized predicates of `aya_ebpf::EbpfContext::command::{constant#0}`
--> /home/runner/work/aya/aya/ebpf/aya-ebpf/src/lib.rs:42:38
|
42 | fn command(&self) -> Result<[u8; TASK_COMM_LEN], c_long> {
| ^^^^^^^^^^^^^
|
note: ...which requires computing normalized predicates of `aya_ebpf::EbpfContext::command::{constant#0}`...
--> /home/runner/work/aya/aya/ebpf/aya-ebpf/src/lib.rs:42:38
|
42 | fn command(&self) -> Result<[u8; TASK_COMM_LEN], c_long> {
| ^^^^^^^^^^^^^
= note: ...which again requires computing revealed normalized predicates of `aya_ebpf::EbpfContext::command::{constant#0}`, completing the cycle
= note: cycle used when normalizing `aya_ebpf::::EbpfContext::command::{constant#0}`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
For more information about this error, try `rustc --explain E0391`.
error: could not document `aya-log-ebpf`
Oddly, this seems specific to rustdoc.
Originally posted by @tamird in https://github.com/rust-lang/rust/issues/139635#issuecomment-2906771024
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the nightly rustdoc failure by documenting aya-log-ebpf and inspect ebpf/aya-ebpf/src/lib.rs:42, especially EbpfContext::command and its TASK_COMM_LEN return type. Compare rustdoc behavior with normal compilation, then use the referenced Rust compiler query documentation to trace the reported cycle. Done means identifying and resolving the rustdoc-only regression with a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100