1 error[E0403]: the name `S` is already used for a generic parameter in this item's generic parameters
2 --> $DIR/issue-103790.rs:4:29
4 LL | struct S<const S: (), const S: S = { S }>;
9 error[E0107]: missing generics for struct `S`
10 --> $DIR/issue-103790.rs:4:32
12 LL | struct S<const S: (), const S: S = { S }>;
13 | ^ expected at least 1 generic argument
15 note: struct defined here, with at least 1 generic parameter: `S`
16 --> $DIR/issue-103790.rs:4:8
18 LL | struct S<const S: (), const S: S = { S }>;
20 help: add missing generic argument
22 LL | struct S<const S: (), const S: S<S> = { S }>;
25 error[E0391]: cycle detected when computing type of `S::S`
26 --> $DIR/issue-103790.rs:4:32
28 LL | struct S<const S: (), const S: S = { S }>;
31 = note: ...which immediately requires computing type of `S::S` again
32 note: cycle used when computing type of `S`
33 --> $DIR/issue-103790.rs:4:1
35 LL | struct S<const S: (), const S: S = { S }>;
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 error[E0391]: cycle detected when computing type of `S`
39 --> $DIR/issue-103790.rs:4:1
41 LL | struct S<const S: (), const S: S = { S }>;
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 note: ...which requires computing type of `S::S`...
45 --> $DIR/issue-103790.rs:4:32
47 LL | struct S<const S: (), const S: S = { S }>;
49 = note: ...which again requires computing type of `S`, completing the cycle
50 note: cycle used when collecting item types in top-level module
51 --> $DIR/issue-103790.rs:1:1
53 LL | / #![feature(generic_const_exprs)]
54 LL | | #![allow(incomplete_features)]
56 LL | | struct S<const S: (), const S: S = { S }>;
62 error: aborting due to 4 previous errors
64 Some errors have detailed explanations: E0107, E0391, E0403.
65 For more information about an error, try `rustc --explain E0107`.