fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0403]: the name `S` is already used for a generic parameter in this item's generic parameters 2 --> $DIR/issue-103790.rs:4:29 3 | 4LL | struct S<const S: (), const S: S = { S }>; 5 | - ^ already used 6 | | 7 | first use of `S` 8 9error[E0107]: missing generics for struct `S` 10 --> $DIR/issue-103790.rs:4:32 11 | 12LL | struct S<const S: (), const S: S = { S }>; 13 | ^ expected at least 1 generic argument 14 | 15note: struct defined here, with at least 1 generic parameter: `S` 16 --> $DIR/issue-103790.rs:4:8 17 | 18LL | struct S<const S: (), const S: S = { S }>; 19 | ^ ----------- 20help: add missing generic argument 21 | 22LL | struct S<const S: (), const S: S<S> = { S }>; 23 | +++ 24 25error[E0391]: cycle detected when computing type of `S::S` 26 --> $DIR/issue-103790.rs:4:32 27 | 28LL | struct S<const S: (), const S: S = { S }>; 29 | ^ 30 | 31 = note: ...which immediately requires computing type of `S::S` again 32note: cycle used when computing type of `S` 33 --> $DIR/issue-103790.rs:4:1 34 | 35LL | struct S<const S: (), const S: S = { S }>; 36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 37 = 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 38 39error[E0391]: cycle detected when computing type of `S` 40 --> $DIR/issue-103790.rs:4:1 41 | 42LL | struct S<const S: (), const S: S = { S }>; 43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 44 | 45note: ...which requires computing type of `S::S`... 46 --> $DIR/issue-103790.rs:4:32 47 | 48LL | struct S<const S: (), const S: S = { S }>; 49 | ^ 50 = note: ...which again requires computing type of `S`, completing the cycle 51note: cycle used when collecting item types in top-level module 52 --> $DIR/issue-103790.rs:1:1 53 | 54LL | / #![feature(generic_const_exprs)] 55LL | | #![allow(incomplete_features)] 56LL | | 57LL | | struct S<const S: (), const S: S = { S }>; 58... | 59LL | | 60LL | | fn main() {} 61 | |____________^ 62 = 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 63 64error: aborting due to 4 previous errors 65 66Some errors have detailed explanations: E0107, E0391, E0403. 67For more information about an error, try `rustc --explain E0107`.