You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Type parameters on static methods don't work right #4096
/home/brian/dev/rust/src/test/run-pass/test.rs:10:19: 10:42 error: not enough type parameters provided for this item
/home/brian/dev/rust/src/test/run-pass/test.rs:10 let _1:float = Nummy::from_inty::<int>(1i);
^~~~~~~~~~~~~~~~~~~~~~~
/home/brian/dev/rust/src/test/run-pass/test.rs:10:19: 10:47 error: this function takes 0 parameters but 1 parameter was supplied
/home/brian/dev/rust/src/test/run-pass/test.rs:10 let _1:float = Nummy::from_inty::<int>(1i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
Static methods have an implicit type parameter for the self type. Calling it with Nummy::from_inty::<float, int>().
This is, at least, my intended behavior when I implemented them. It isn't clear to me what else would be sensible. This mostly sounds like a documentation problem?
Activity
msullivan commentedon Jul 3, 2013
Static methods have an implicit type parameter for the self type. Calling it with
Nummy::from_inty::<float, int>().This is, at least, my intended behavior when I implemented them. It isn't clear to me what else would be sensible. This mostly sounds like a documentation problem?
catamorphism commentedon Aug 12, 2013
Fixed in #8477 -- close this when it lands.
auto merge of #8477 : catamorphism/rust/issue-4096, r=msullivan
Link tracking issues in Configurations.md (rust-lang#4096)
Merge rust-lang#4096