-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9823f17
commit c81521a
Showing
4 changed files
with
39 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
error: constant evaluation is taking a long time | ||
--> $DIR/infinite_loop.rs:15:9 | ||
| | ||
LL | / while n != 0 { | ||
LL | | | ||
LL | | n = if n % 2 == 0 { n / 2 } else { 3 * n + 1 }; | ||
LL | | } | ||
| |_________^ | ||
| | ||
= note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval. | ||
If your compilation actually takes a long time, you can safely allow the lint. | ||
help: the constant being evaluated | ||
--> $DIR/infinite_loop.rs:13:18 | ||
| | ||
LL | let s = [(); { | ||
| __________________^ | ||
LL | | let mut n = 113383; // #20 in https://oeis.org/A006884 | ||
LL | | while n != 0 { | ||
LL | | | ||
... | | ||
LL | | n | ||
LL | | }]; | ||
| |_____^ | ||
= note: `#[deny(long_running_const_eval)]` on by default | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters