-
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.
add non-regression test for issue 115351
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.rs
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,12 @@ | ||
//~ ERROR overflow evaluating the requirement `Self well-formed` | ||
//~| ERROR overflow evaluating the requirement `Self: Trait` | ||
|
||
// This is a non-regression test for issue #115351, where a recursion limit of 0 caused an ICE. | ||
// compile-flags: -Ztrait-solver=next --crate-type=lib | ||
// check-fail | ||
|
||
#![recursion_limit = "0"] | ||
trait Trait {} | ||
impl Trait for u32 {} | ||
//~^ ERROR overflow evaluating the requirement `u32: Trait` | ||
//~| ERROR overflow evaluating the requirement `u32 well-formed` |
27 changes: 27 additions & 0 deletions
27
tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.stderr
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[E0275]: overflow evaluating the requirement `Self: Trait` | ||
| | ||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`recursion_limit_zero_issue_115351`) | ||
|
||
error[E0275]: overflow evaluating the requirement `Self well-formed` | ||
| | ||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`recursion_limit_zero_issue_115351`) | ||
|
||
error[E0275]: overflow evaluating the requirement `u32: Trait` | ||
--> $DIR/recursion-limit-zero-issue-115351.rs:10:16 | ||
| | ||
LL | impl Trait for u32 {} | ||
| ^^^ | ||
| | ||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`recursion_limit_zero_issue_115351`) | ||
|
||
error[E0275]: overflow evaluating the requirement `u32 well-formed` | ||
--> $DIR/recursion-limit-zero-issue-115351.rs:10:16 | ||
| | ||
LL | impl Trait for u32 {} | ||
| ^^^ | ||
| | ||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`recursion_limit_zero_issue_115351`) | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0275`. |