Skip to content

Commit eefa07d

Browse files
committed
add non-regression test for issue 115351
1 parent 0e1e964 commit eefa07d

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//~ ERROR overflow evaluating the requirement `Self well-formed`
2+
//~| ERROR overflow evaluating the requirement `Self: Trait`
3+
4+
// This is a non-regression test for issue #115351, where a recursion limit of 0 caused an ICE.
5+
// compile-flags: -Ztrait-solver=next --crate-type=lib
6+
// check-fail
7+
8+
#![recursion_limit = "0"]
9+
trait Trait {}
10+
impl Trait for u32 {}
11+
//~^ ERROR overflow evaluating the requirement `u32: Trait`
12+
//~| ERROR overflow evaluating the requirement `u32 well-formed`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
error[E0275]: overflow evaluating the requirement `Self: Trait`
2+
|
3+
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`recursion_limit_zero_issue_115351`)
4+
5+
error[E0275]: overflow evaluating the requirement `Self well-formed`
6+
|
7+
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`recursion_limit_zero_issue_115351`)
8+
9+
error[E0275]: overflow evaluating the requirement `u32: Trait`
10+
--> $DIR/recursion-limit-zero-issue-115351.rs:10:16
11+
|
12+
LL | impl Trait for u32 {}
13+
| ^^^
14+
|
15+
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`recursion_limit_zero_issue_115351`)
16+
17+
error[E0275]: overflow evaluating the requirement `u32 well-formed`
18+
--> $DIR/recursion-limit-zero-issue-115351.rs:10:16
19+
|
20+
LL | impl Trait for u32 {}
21+
| ^^^
22+
|
23+
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`recursion_limit_zero_issue_115351`)
24+
25+
error: aborting due to 4 previous errors
26+
27+
For more information about this error, try `rustc --explain E0275`.

0 commit comments

Comments
 (0)