Skip to content

Instantly share code, notes, and snippets.

@huonw
Forked from anonymous/gist:6302082
Created August 22, 2013 00:58
Show Gist options
  • Select an option

  • Save huonw/6302086 to your computer and use it in GitHub Desktop.

Select an option

Save huonw/6302086 to your computer and use it in GitHub Desktop.
trait A {}
fn foo<T: A>(_: &T) {}
struct B;
impl A for B {}
impl<'self> A for &'self A {}
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