Skip to content

Instantly share code, notes, and snippets.

Created December 1, 2015 07:03
Show Gist options
  • Save anonymous/ee5d05aa3c093a325d86 to your computer and use it in GitHub Desktop.
Save anonymous/ee5d05aa3c093a325d86 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
use std::fmt::Debug;
fn takes_two_things<T: Debug, U: Debug>(x: T, y: U) {
println!("{:?} {:?}", x, y);
}
fn main() {
takes_two_things(3, "ok");
takes_two_things(3, 2); // fine if the same
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment