-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear response values for overflow in new solver
- Loading branch information
1 parent
1c42cb4
commit 5fa8209
Showing
4 changed files
with
88 additions
and
9 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,20 @@ | ||
// compile-flags: -Ztrait-solver=next | ||
|
||
trait Trait {} | ||
|
||
struct W<T>(T); | ||
|
||
impl<T, U> Trait for W<(W<T>, W<U>)> | ||
where | ||
W<T>: Trait, | ||
W<U>: Trait, | ||
{ | ||
} | ||
|
||
fn impls<T: Trait>() {} | ||
|
||
fn main() { | ||
impls::<W<_>>(); | ||
//~^ ERROR type annotations needed | ||
//~| ERROR overflow evaluating the requirement `W<_>: Trait` | ||
} |
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,23 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/exponential-trait-goals.rs:17:5 | ||
| | ||
LL | impls::<W<_>>(); | ||
| ^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `impls` | ||
|
||
error[E0275]: overflow evaluating the requirement `W<_>: Trait` | ||
--> $DIR/exponential-trait-goals.rs:17:5 | ||
| | ||
LL | impls::<W<_>>(); | ||
| ^^^^^^^^^^^^^ | ||
| | ||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`exponential_trait_goals`) | ||
note: required by a bound in `impls` | ||
--> $DIR/exponential-trait-goals.rs:14:13 | ||
| | ||
LL | fn impls<T: Trait>() {} | ||
| ^^^^^ required by this bound in `impls` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0275, E0282. | ||
For more information about an error, try `rustc --explain E0275`. |