Guest User

Untitled

a guest
Jun 25th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. use std::borrow::Borrow;
  2. use std::fmt::Debug;
  3.  
  4. fn foo<U, T>(t: T) -> String
  5. where T: Borrow<U>, U: ?Sized + Debug
  6. {
  7. format!("{:?}", t.borrow())
  8. }
  9.  
  10. fn main() {
  11. foo::<str, _>("hi");
  12. }
Add Comment
Please, Sign In to add comment