-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-bugCategory: This is a bug.Category: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`I-cycleIssue: A query cycle occurred while none was expectedIssue: A query cycle occurred while none was expectedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.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.
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 #139635 (comment)
nazar-pc
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-bugCategory: This is a bug.Category: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`I-cycleIssue: A query cycle occurred while none was expectedIssue: A query cycle occurred while none was expectedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.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.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
BoxyUwU commentedon May 24, 2025
I'm not sure how #139635 would have caused this, it doesn't touch anything to do with what queries get called so shouldn't be introducing new query cycles. @tamird what makes you think that's the PR that regressed your crate?
tamird commentedon May 24, 2025
The tests updated in that PR contain the same diagnostic text e.g. b1774b8#diff-d26852ce626e7632e48fd9e08630bf948f008ef8f7de7b00336c6b9cb0eda19f
tamird commentedon May 24, 2025
Ah, I posted this on the wrong PR, it was probably #140553.
BoxyUwU commentedon May 24, 2025
Ah I see what you mean. I'll take a look and see what happened there and verify if it was that PR that caused it.
BoxyUwU commentedon May 24, 2025
@tamird I can't seem to reproduce the failure locally, though I did notice that the crate sometimes uses
generic_const_exprs
. Is the CI failure happening in a place where theunstable
cfg is set and sogeneric_const_exprs
is enabled?BoxyUwU commentedon May 24, 2025
Ah running
cargo xtask public-api --bless
reproduces it and stops when removing the enabling ofgeneric_const_exprs
. So I think this is a gce only regression, and also seems reasonable to expect that #140553 was the causeaya-ebpf: disable generic_const_exprs
tamird commentedon May 24, 2025
Thanks for the diagnosis. I've sent aya-rs/aya#1271 to work around this in aya for now.
aya-ebpf: disable generic_const_exprs
nazar-pc commentedon May 24, 2025
I see something that looks very similar with cargo check/clippy too:
Reproducible by removing workaround (
#![feature(generic_const_exprs)]
in a crate that uses another crate with#![feature(generic_const_exprs)]
, but doesn't need it on its own):https://github.com/nazar-pc/abundance/blob/d29afd13ec5ce2a6598cf9ef7a3b886f1b19454a/crates/shared/ab-core-primitives/src/lib.rs#L16-L19
aya-ebpf: disable generic_const_exprs
robert3005 commentedon Jun 16, 2025
Is there a workaround for this issue that's different than getting rid of GCE? If you want an easy repro you can see https://docs.rs/crate/vortex/0.39.0/builds/2221527