error[E0391]: cycle detected when computing type of `Foo` --> $DIR/nested-type.rs:4:1 | LL | struct Foo $DIR/nested-type.rs:4:18 | LL | struct Foo $DIR/nested-type.rs:4:26 | LL | struct Foo; ... | LL | | Foo::<17>::value() LL | | }]>; | |_^ note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`... --> $DIR/nested-type.rs:4:26 | LL | struct Foo; ... | LL | | Foo::<17>::value() LL | | }]>; | |_^ note: ...which requires const-evaluating `Foo::{{constant}}#0`... --> $DIR/nested-type.rs:4:26 | LL | struct Foo; ... | LL | | Foo::<17>::value() LL | | }]>; | |_^ note: ...which requires type-checking `Foo::{{constant}}#0`... --> $DIR/nested-type.rs:4:26 | LL | struct Foo; ... | LL | | Foo::<17>::value() LL | | }]>; | |_^ note: ...which requires computing the variances of `Foo::{{constant}}#0::Foo`... --> $DIR/nested-type.rs:7:5 | LL | struct Foo; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which requires computing the variances for items in this crate... = note: ...which again requires computing type of `Foo`, completing the cycle note: cycle used when collecting item types in top-level module --> $DIR/nested-type.rs:1:1 | LL | / #![feature(const_generics)] LL | | #![allow(incomplete_features)] LL | | LL | | struct Foo $DIR/nested-type.rs:4:1 | LL | struct Foo $DIR/nested-type.rs:4:18 | LL | struct Foo $DIR/nested-type.rs:4:26 | LL | struct Foo; ... | LL | | Foo::<17>::value() LL | | }]>; | |_^ note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`... --> $DIR/nested-type.rs:4:26 | LL | struct Foo; ... | LL | | Foo::<17>::value() LL | | }]>; | |_^ note: ...which requires const-evaluating `Foo::{{constant}}#0`... --> $DIR/nested-type.rs:4:26 | LL | struct Foo; ... | LL | | Foo::<17>::value() LL | | }]>; | |_^ note: ...which requires type-checking `Foo::{{constant}}#0`... --> $DIR/nested-type.rs:4:26 | LL | struct Foo; ... | LL | | Foo::<17>::value() LL | | }]>; | |_^ note: ...which requires computing the variances of `Foo::{{constant}}#0::Foo`... --> $DIR/nested-type.rs:7:5 | LL | struct Foo; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which requires computing the variances for items in this crate... = note: ...which again requires computing type of `Foo`, completing the cycle note: cycle used when collecting item types in top-level module --> $DIR/nested-type.rs:1:1 | LL | / #![feature(const_generics)] LL | | #![allow(incomplete_features)] LL | | LL | | struct Foo