Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. trait For {
  2. fn four(&self) {}
  3. }
  4.  
  5. impl<'four> For for &'four for<'fore> For
  6. where
  7. for<'fore> For: For
  8. {
  9. fn four(self: &&'four for<'fore> For) {
  10. print!("four")
  11. }
  12. }
  13.  
  14. impl For for for<'four> fn(&'four for<'fore> For) {
  15. fn four(&self) {
  16. print!("for")
  17. }
  18. }
  19.  
  20. fn four(four: &for<'four> For) {
  21. <&for<'four> For as For>::four(&{
  22. ((&four).four(), four.four());
  23. four
  24. })
  25. }
  26.  
  27. fn main() {
  28. four(&(four as for<'four> fn(&'four for<'fore> For)))
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement