This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 11error[E0391]: cycle detected when const-evaluating `FOO`
2- --> $DIR/recursive-zst-static.rs:7 :18
2+ --> $DIR/recursive-zst-static.rs:10 :18
33 |
44LL | static FOO: () = FOO;
55 | ^^^
66 |
77note: ...which requires const-evaluating `FOO`...
8- --> $DIR/recursive-zst-static.rs:7 :1
8+ --> $DIR/recursive-zst-static.rs:10 :1
99 |
1010LL | static FOO: () = FOO;
1111 | ^^^^^^^^^^^^^^^^^^^^^
1212 = note: ...which again requires const-evaluating `FOO`, completing the cycle
1313note: cycle used when const-evaluating + checking `FOO`
14- --> $DIR/recursive-zst-static.rs:7 :1
14+ --> $DIR/recursive-zst-static.rs:10 :1
1515 |
1616LL | static FOO: () = FOO;
1717 | ^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change 1+ // revisions: default unleash
2+ //[unleash]compile-flags: -Zunleash-the-miri-inside-of-you
3+
14// This test ensures that we do not allow ZST statics to initialize themselves without ever
25// actually creating a value of that type. This is important, as the ZST may have private fields
36// that users can reasonably expect to only get initialized by their own code. Thus unsafe code
Original file line number Diff line number Diff line change 1+ error[E0391]: cycle detected when const-evaluating `FOO`
2+ --> $DIR/recursive-zst-static.rs:10:18
3+ |
4+ LL | static FOO: () = FOO;
5+ | ^^^
6+ |
7+ note: ...which requires const-evaluating `FOO`...
8+ --> $DIR/recursive-zst-static.rs:10:1
9+ |
10+ LL | static FOO: () = FOO;
11+ | ^^^^^^^^^^^^^^^^^^^^^
12+ = note: ...which again requires const-evaluating `FOO`, completing the cycle
13+ note: cycle used when const-evaluating + checking `FOO`
14+ --> $DIR/recursive-zst-static.rs:10:1
15+ |
16+ LL | static FOO: () = FOO;
17+ | ^^^^^^^^^^^^^^^^^^^^^
18+
19+ error: aborting due to previous error
20+
21+ For more information about this error, try `rustc --explain E0391`.
You can’t perform that action at this time.
0 commit comments