2 // All 3 expressions should work in that the argument gets
3 // coerced to a trait object
5 // pretty-expanded FIXME #23616
8 send::<Box<dyn Foo>>(Box::new(Output(0)));
9 Test::<Box<dyn Foo>>::foo(Box::new(Output(0)));
10 Test::<Box<dyn Foo>>::new().send(Box::new(Output(0)));
15 struct Test<T> { marker: std::marker::PhantomData<T> }
17 fn new() -> Test<T> { Test { marker: ::std::marker::PhantomData } }
19 fn send(&self, _: T) {}
22 trait Foo { fn dummy(&self) { }}
24 impl Foo for Output {}