Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #![feature(specialization)]
  2.  
  3. trait Foo : Sized {
  4. fn foo(self) {}
  5. }
  6.  
  7. struct A;
  8.  
  9. impl<T: Into<A>> Foo for T { }
  10.  
  11. impl From<f64> for A {
  12. default fn from(_v: f64) -> A { A }
  13. }
  14.  
  15. fn main() {
  16. Foo::foo(0.0)
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement