-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't bail when encountering many placeholders
- Loading branch information
Showing
4 changed files
with
21 additions
and
15 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
16 changes: 16 additions & 0 deletions
16
tests/ui/traits/next-solver/canonical/do-not-bail-due-to-placeholders.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,16 @@ | ||
//@ compile-flags: -Znext-solver | ||
//@ check-pass | ||
|
||
// When canonicalizing responses, we bail if there are too many inference variables. | ||
// We previously also counted placeholders, which is incorrect. | ||
#![recursion_limit = "8"] | ||
|
||
fn foo<T>() {} | ||
|
||
fn bar<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>() { | ||
// The query response will contain 10 placeholders, which previously | ||
// caused us to bail here. | ||
foo::<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)>(); | ||
} | ||
|
||
fn main() {} |
6 changes: 3 additions & 3 deletions
6
tests/ui/traits/next-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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
//~ ERROR overflow evaluating the requirement `Self: Trait` | ||
//~^ ERROR overflow evaluating the requirement `Self well-formed` | ||
// This is a non-regression test for issue #115351, where a recursion limit of 0 caused an ICE. | ||
//@ check-pass | ||
//@ compile-flags: -Znext-solver --crate-type=lib | ||
|
||
// This is a non-regression test for issue #115351, where a recursion limit of 0 caused an ICE. | ||
|
||
#![recursion_limit = "0"] | ||
trait Trait {} | ||
impl Trait for u32 {} |
11 changes: 0 additions & 11 deletions
11
tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.stderr
This file was deleted.
Oops, something went wrong.