[rust-dev] Function Definition Type Inference

Ian Daniher explodingmind at gmail.com
Thu Jun 5 09:07:33 PDT 2014

Hey All,

I have a rust program that generates rust source code, including function

I don't yet have much in the way of type inference baked into my code,
relying instead upon on compile time analysis provided by rustc.

This works well, except for when dealing with the type of function
arguments, which cannot be inferred (except via trait bounds[2]) at compile

Is there a mechanism through which I can hand off an ast::Item object with
a FnDecl's Vec<Arg> having TyInfer[3] and get it back with inferred type?


[1] https://github.com/itdaniher/ratpak/blob/master/stage2.rs
[2] currently exploring this, but looking for alternatives first
[3] http://static.rust-lang.org/doc/master/syntax/ast/type.Ty_.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140605/c1473d13/attachment.html>

More information about the Rust-dev mailing list