blob: 7ebc348996f5e7bfa40a8c6145b9e457ffffd63c [file] [log] [blame]
// This used to ICE because it creates an `impl Trait` that captures a
// hidden empty region.
#![feature(conservative_impl_trait)]
fn server() -> impl FilterBase2 { //~ ERROR [E0700]
segment2(|| { loop { } }).map2(|| "")
}
trait FilterBase2 {
fn map2<F>(self, _fn: F) -> Map2<F> where Self: Sized { loop { } }
}
struct Map2<F> { _func: F }
impl<F> FilterBase2 for Map2<F> { }
fn segment2<F>(_fn: F) -> Map2<F> where F: Fn() -> Result<(), ()> {
loop { }
}
fn main() { server(); }