You'll always need a concrete type in order to get the trait method for that type. Something like this may work for you though:
trait A { fn foo(Self); } impl A for int { fn foo(a: int) {} } fn main() { let f: fn(int) = A::foo; } On Fri, Feb 14, 2014 at 2:14 PM, Tommy M. McGuire <mcgu...@crsr.net> wrote: > Suppose I have a trait T: > > trait A { > fn fun<T:A>(t:T); // <- [1] > } > > Is there a way to get a pointer to the implementation of fun for a > specific T? How would I go about calling it? > > (Yeah, I know I'm kinda far off the reservation.) > > [1] Not necessarily an instance method, but that would be useful, too. > > > -- > Tommy M. McGuire > mcgu...@crsr.net > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev