trait clam { fn chowder(y: A); } struct foo : clam { let x: A; fn chowder(y: A) { } } fn foo(b: A) -> foo { foo { x: b } } fn f(x: clam, a: A) { x.chowder(a); } fn main() { let c = foo(42); let d: clam = c as clam::; f(d, c.x); }