Skip to content

Instantly share code, notes, and snippets.

Created August 22, 2013 00:58
Show Gist options
  • Save anonymous/6302082 to your computer and use it in GitHub Desktop.
Save anonymous/6302082 to your computer and use it in GitHub Desktop.
trait A {}
fn foo<T: A>(_: &T) {}
struct B;
impl A for B {}
fn main() {
let a = B;
foo(&a);
foo(&a as &A);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment