blob: 44d0fdbdda9b0b9b1caa09c4af288293a25e40da [file]
//@ known-bug: #150263
//@ compile-flags: --crate-type lib -C opt-level=3
pub trait Scope {
type Timestamp;
}
impl<G> Scope for G {
type Timestamp = ();
}
pub fn create<G: Scope>() {
enter::<G>();
}
fn enter<G>() {
unary::<G>(|_: <G as Scope>::Timestamp| {});
}
fn unary<G: Scope>(constructor: impl FnOnce(G::Timestamp)) {
constructor(None.unwrap());
}