Open
Description
Taken out from here: #8995 (comment) as @fmease requested.
struct Foo {
bar: Self::Bar,
}
impl Foo {
pub type Bar = usize;
}
was compiled successfully a couple of nighly revisions before.
Now an error is returned:
error[E0391]: cycle detected when computing predicates of `Foo`
--> src\main.rs:5:1
|
5 | struct Foo {
| ^^^^^^^^^^
|
note: ...which requires computing predicates of `Foo`...
--> src\main.rs:5:1
|
5 | struct Foo {
| ^^^^^^^^^^
note: ...which requires computing inferred outlives predicates of `Foo`...
--> src\main.rs:5:1
|
5 | struct Foo {
| ^^^^^^^^^^
= note: ...which requires computing the inferred outlives predicates for items in this crate...
note: ...which requires computing type of `Foo::bar`...
--> src\main.rs:6:5
|
6 | bar: Self::Bar,
| ^^^^^^^^^^^^^^
note: ...which requires computing normalized predicates of `Foo`...
--> src\main.rs:5:1
|
5 | struct Foo {
| ^^^^^^^^^^
= note: ...which again requires computing predicates of `Foo`, completing the cycle
note: cycle used when collecting item types in top-level module
Meta
rustc --version --verbose
:
rustc 1.69.0-nightly (34e6673a0 2023-02-25)
Metadata
Metadata
Assignees
Labels
Category: This is a bug.`#![feature(inherent_associated_types)]`Issue: A query cycle occurred while none was expectedStatus: This bug is tracked inside the repo by a `known-bug` test.Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.