]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/nested-type.stderr
pin docs: add some forward references
[rust.git] / src / test / ui / const-generics / nested-type.stderr
1 error[E0391]: cycle detected when computing type of `Foo`
2   --> $DIR/nested-type.rs:4:1
3    |
4 LL | struct Foo<const N: [u8; {
5    | ^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 note: ...which requires computing type of `Foo::N`...
8   --> $DIR/nested-type.rs:4:18
9    |
10 LL | struct Foo<const N: [u8; {
11    |                  ^
12 note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`...
13   --> $DIR/nested-type.rs:4:26
14    |
15 LL |   struct Foo<const N: [u8; {
16    |  __________________________^
17 LL | |
18 LL | |
19 LL | |     struct Foo<const N: usize>;
20 ...  |
21 LL | |     Foo::<17>::value()
22 LL | | }]>;
23    | |_^
24 note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`...
25   --> $DIR/nested-type.rs:4:26
26    |
27 LL |   struct Foo<const N: [u8; {
28    |  __________________________^
29 LL | |
30 LL | |
31 LL | |     struct Foo<const N: usize>;
32 ...  |
33 LL | |     Foo::<17>::value()
34 LL | | }]>;
35    | |_^
36 note: ...which requires const-evaluating `Foo::{{constant}}#0`...
37   --> $DIR/nested-type.rs:4:26
38    |
39 LL |   struct Foo<const N: [u8; {
40    |  __________________________^
41 LL | |
42 LL | |
43 LL | |     struct Foo<const N: usize>;
44 ...  |
45 LL | |     Foo::<17>::value()
46 LL | | }]>;
47    | |_^
48 note: ...which requires type-checking `Foo::{{constant}}#0`...
49   --> $DIR/nested-type.rs:4:26
50    |
51 LL |   struct Foo<const N: [u8; {
52    |  __________________________^
53 LL | |
54 LL | |
55 LL | |     struct Foo<const N: usize>;
56 ...  |
57 LL | |     Foo::<17>::value()
58 LL | | }]>;
59    | |_^
60 note: ...which requires computing the variances of `Foo::{{constant}}#0::Foo`...
61   --> $DIR/nested-type.rs:7:5
62    |
63 LL |     struct Foo<const N: usize>;
64    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
65    = note: ...which requires computing the variances for items in this crate...
66    = note: ...which again requires computing type of `Foo`, completing the cycle
67 note: cycle used when collecting item types in top-level module
68   --> $DIR/nested-type.rs:1:1
69    |
70 LL | / #![feature(const_generics)]
71 LL | | #![allow(incomplete_features)]
72 LL | |
73 LL | | struct Foo<const N: [u8; {
74 ...  |
75 LL | |
76 LL | | fn main() {}
77    | |____________^
78
79 error[E0391]: cycle detected when computing type of `Foo`
80   --> $DIR/nested-type.rs:4:1
81    |
82 LL | struct Foo<const N: [u8; {
83    | ^^^^^^^^^^^^^^^^^^^^^^^^
84    |
85 note: ...which requires computing type of `Foo::N`...
86   --> $DIR/nested-type.rs:4:18
87    |
88 LL | struct Foo<const N: [u8; {
89    |                  ^
90 note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`...
91   --> $DIR/nested-type.rs:4:26
92    |
93 LL |   struct Foo<const N: [u8; {
94    |  __________________________^
95 LL | |
96 LL | |
97 LL | |     struct Foo<const N: usize>;
98 ...  |
99 LL | |     Foo::<17>::value()
100 LL | | }]>;
101    | |_^
102 note: ...which requires const-evaluating + checking `Foo::{{constant}}#0`...
103   --> $DIR/nested-type.rs:4:26
104    |
105 LL |   struct Foo<const N: [u8; {
106    |  __________________________^
107 LL | |
108 LL | |
109 LL | |     struct Foo<const N: usize>;
110 ...  |
111 LL | |     Foo::<17>::value()
112 LL | | }]>;
113    | |_^
114 note: ...which requires const-evaluating `Foo::{{constant}}#0`...
115   --> $DIR/nested-type.rs:4:26
116    |
117 LL |   struct Foo<const N: [u8; {
118    |  __________________________^
119 LL | |
120 LL | |
121 LL | |     struct Foo<const N: usize>;
122 ...  |
123 LL | |     Foo::<17>::value()
124 LL | | }]>;
125    | |_^
126 note: ...which requires type-checking `Foo::{{constant}}#0`...
127   --> $DIR/nested-type.rs:4:26
128    |
129 LL |   struct Foo<const N: [u8; {
130    |  __________________________^
131 LL | |
132 LL | |
133 LL | |     struct Foo<const N: usize>;
134 ...  |
135 LL | |     Foo::<17>::value()
136 LL | | }]>;
137    | |_^
138 note: ...which requires computing the variances of `Foo::{{constant}}#0::Foo`...
139   --> $DIR/nested-type.rs:7:5
140    |
141 LL |     struct Foo<const N: usize>;
142    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
143    = note: ...which requires computing the variances for items in this crate...
144    = note: ...which again requires computing type of `Foo`, completing the cycle
145 note: cycle used when collecting item types in top-level module
146   --> $DIR/nested-type.rs:1:1
147    |
148 LL | / #![feature(const_generics)]
149 LL | | #![allow(incomplete_features)]
150 LL | |
151 LL | | struct Foo<const N: [u8; {
152 ...  |
153 LL | |
154 LL | | fn main() {}
155    | |____________^
156
157 error: aborting due to 2 previous errors
158
159 For more information about this error, try `rustc --explain E0391`.