Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(specialization)]
- trait Foo : Sized {
- fn foo(self) {}
- }
- struct A;
- impl<T: Into<A>> Foo for T { }
- impl From<f64> for A {
- default fn from(_v: f64) -> A { A }
- }
- fn main() {
- Foo::foo(0.0)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement