Skip to content

Commit 964e311

Browse files
committed
Also test under next solver
1 parent ad00868 commit 964e311

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0282]: type annotations needed
2+
--> $DIR/recursive-bound-eval.rs:20:13
3+
|
4+
LL | move || recursive_fn().parse()
5+
| ^^^^^^^^^^^^^^ cannot infer type
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0282`.

tests/ui/impl-trait/recursive-bound-eval.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
//! Test that we can evaluate nested obligations when invoking methods on recursive calls on
22
//! an RPIT.
33
4-
//@ check-pass
4+
//@revisions: next current
5+
//@[next] compile-flags: -Znext-solver
6+
7+
//@[current] check-pass
58

69
pub trait Parser<E> {
710
fn parse(&self) -> E;
@@ -15,6 +18,7 @@ impl<E, T: Fn() -> E> Parser<E> for T {
1518

1619
pub fn recursive_fn<E>() -> impl Parser<E> {
1720
move || recursive_fn().parse()
21+
//[next]~^ ERROR: type annotations needed
1822
}
1923

2024
fn main() {}

0 commit comments

Comments
 (0)