mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
23 lines
386 B
Rust
23 lines
386 B
Rust
//@ known-bug: #130524
|
|
|
|
trait Transform {
|
|
type Output<'a>;
|
|
}
|
|
|
|
trait Propagate<Input> {}
|
|
|
|
fn new_node<T: Transform>(_c: Vec<Box<dyn for<'a> Propagate<<T as Transform>::Output<'a>>>>) -> T {
|
|
todo!()
|
|
}
|
|
|
|
impl<Input, T> Propagate<Input> for T {}
|
|
struct Noop;
|
|
|
|
impl Transform for Noop {
|
|
type Output<'a> = ();
|
|
}
|
|
|
|
fn main() {
|
|
let _node: Noop = new_node(vec![Box::new(Noop)]);
|
|
}
|