Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::string::ToString;
- fn main() {
- let to_string: for<'r> fn(&'r (std::fmt::Display + 'static)) -> String = <std::fmt::Display as ToString>::to_string;
- let i = 1;
- let b = &i;
- assert_eq!("", to_string(&b));
- }
Add Comment
Please, Sign In to add comment