That is somewhat surprising to me. In some cases you do need type annotations but I wouldn't expect one to be required on that line. Can you give a larger snippet, including perhaps the body of the function you are calling?

Also, you can try an explicit annotation:

        glut::init(~1, |glut_s: GLUT<int>|) { ... }


Niko

[email protected] wrote:

I'm trying to create a function which initializes a generic structure with a generic value. However, rustc is giving me the error that is the subject. I have no idea why this is happening. Anyone have any tips?

Code here: http://pastebin.com/6LiciGeX

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to