Closed
Description
#17041 implemented unboxed closure sugar parsing for trait bounds, but it doesn't seem to be implemented for trait objects.
I realize that this example probably wouldn't work anyway due to the lack of higher-rank lifetimes, but the point is that the compiler yields a parser error.
trait Router {
fn route(&mut self, p: &Path) -> Path;
}
impl<'a> Router for Box<FnMut(&'a Path) -> Path + 'a> {
fn route(&mut self, p: &Path) -> Path {
(*self).call_mut((p,))
}
}
fn main() {}
@p1start observed this as well.