File tree 2 files changed +39
-0
lines changed
tests/ui/traits/new-solver/overflow
2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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`.
You can’t perform that action at this time.
0 commit comments