-
Couldn't load subscription status.
- Fork 0
Closed
Description
affected test
- tests/ui/impl-trait/recursive-bound-eval.rs
pub trait Parser<E> {
fn parse(&self) -> E;
}
impl<E, T: Fn() -> E> Parser<E> for T {
fn parse(&self) -> E {
self()
}
}
pub fn recursive_fn<E>() -> impl Parser<E> {
move || recursive_fn().parse()
}
fn main() {}Even when allowing the method call, we end up with following opaque type definitions and ambiguous goal
opaque<?recursive_call> = ?inferopaque<E> = closure<fn() -> E>?infer: Parser<E>(from the.parse()call)
We could (and maybe should) apply, the defining use opaque<E> = closure<fn() -> E> to opaque<?recursive_call>, equating ?infer with closure<fn() -> ?recursive_call>, at which point this will compile after proving closure<fn() -> ?recursive_call>: Parser<E>.
Metadata
Metadata
Assignees
Labels
No labels