Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::fmt::Debug;
- fn debug<T>(msg: &str, val: T) where T: Debug
- {
- eprintln!("{} {:?}", msg, val);
- }
- fn main()
- {
- debug("hello", 17);
- debug("world", "eighteen");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement