summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-103790.stderr
blob: 67334469dcde58965e44807fa4f96ec2f0636a14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
error[E0403]: the name `S` is already used for a generic parameter in this item's generic parameters
  --> $DIR/issue-103790.rs:4:29
   |
LL | struct S<const S: (), const S: S = { S }>;
   |                -            ^ already used
   |                |
   |                first use of `S`

error[E0107]: missing generics for struct `S`
  --> $DIR/issue-103790.rs:4:32
   |
LL | struct S<const S: (), const S: S = { S }>;
   |                                ^ expected at least 1 generic argument
   |
note: struct defined here, with at least 1 generic parameter: `S`
  --> $DIR/issue-103790.rs:4:8
   |
LL | struct S<const S: (), const S: S = { S }>;
   |        ^ -----------
help: add missing generic argument
   |
LL | struct S<const S: (), const S: S<S> = { S }>;
   |                                 +++

error[E0391]: cycle detected when computing type of `S::S`
  --> $DIR/issue-103790.rs:4:32
   |
LL | struct S<const S: (), const S: S = { S }>;
   |                                ^
   |
   = note: ...which immediately requires computing type of `S::S` again
note: cycle used when computing type of `S`
  --> $DIR/issue-103790.rs:4:1
   |
LL | struct S<const S: (), const S: S = { S }>;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = 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

error[E0391]: cycle detected when computing type of `S`
  --> $DIR/issue-103790.rs:4:1
   |
LL | struct S<const S: (), const S: S = { S }>;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: ...which requires computing type of `S::S`...
  --> $DIR/issue-103790.rs:4:32
   |
LL | struct S<const S: (), const S: S = { S }>;
   |                                ^
   = note: ...which again requires computing type of `S`, completing the cycle
note: cycle used when collecting item types in top-level module
  --> $DIR/issue-103790.rs:1:1
   |
LL | / #![feature(generic_const_exprs)]
LL | | #![allow(incomplete_features)]
LL | |
LL | | struct S<const S: (), const S: S = { S }>;
...  |
LL | |
LL | | fn main() {}
   | |____________^
   = 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

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0107, E0391, E0403.
For more information about an error, try `rustc --explain E0107`.