mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
27 lines
552 B
Rust
27 lines
552 B
Rust
//@ known-bug: #120911
|
|
trait Container {
|
|
type Item<'a>;
|
|
}
|
|
impl Container for () {
|
|
type Item<'a> = ();
|
|
}
|
|
struct Exchange<C, F> {
|
|
_marker: std::marker::PhantomData<(C, F)>,
|
|
}
|
|
fn exchange<C, F>(_: F) -> Exchange<C, F>
|
|
where
|
|
C: Container,
|
|
for<'a> F: FnMut(&C::Item<'a>),
|
|
{
|
|
unimplemented!()
|
|
}
|
|
trait Parallelization<C> {}
|
|
impl<C, F> Parallelization<C> for Exchange<C, F> {}
|
|
fn unary_frontier<P: Parallelization<()>>(_: P) {}
|
|
fn main() {
|
|
let exchange = exchange(|_| ());
|
|
let _ = || {
|
|
unary_frontier(exchange);
|
|
};
|
|
}
|