Re: [rust-dev] syntax for explicit generics when calling static method

2014-06-04 Thread Igor Bukanov
Thanks, Testnew() works indeed. On 4 June 2014 09:52, Sebastian Gesemann wrote: > On Wed, Jun 4, 2014 at 9:28 AM, Igor Bukanov wrote: >> What is the syntax for calling a static method of a generic struct >> while selecting the the generic parameters explicitly? Apparently >> Struct::static_me

Re: [rust-dev] syntax for explicit generics when calling static method

2014-06-04 Thread Tommi
Apparently this works as well: let t = Testnew().test(); println!("t={}", t); On 2014-06-04, at 10:50, Tommi wrote: > I don't know if there's a better way, but this at least works: > > let tmp: Test = Test::new(); > let t = tmp.test(); > println!("t={}", t); > > On 2014-06-04, at 10:28, I

Re: [rust-dev] syntax for explicit generics when calling static method

2014-06-04 Thread Sebastian Gesemann
On Wed, Jun 4, 2014 at 9:28 AM, Igor Bukanov wrote: > What is the syntax for calling a static method of a generic struct > while selecting the the generic parameters explicitly? Apparently > Struct::static_method does not work. For example, consider the > following program: > > #[deriving(Show)] >

Re: [rust-dev] syntax for explicit generics when calling static method

2014-06-04 Thread Tommi
I don't know if there's a better way, but this at least works: let tmp: Test = Test::new(); let t = tmp.test(); println!("t={}", t); On 2014-06-04, at 10:28, Igor Bukanov wrote: > What is the syntax for calling a static method of a generic struct > while selecting the the generic parameters exp

[rust-dev] syntax for explicit generics when calling static method

2014-06-04 Thread Igor Bukanov
What is the syntax for calling a static method of a generic struct while selecting the the generic parameters explicitly? Apparently Struct::static_method does not work. For example, consider the following program: #[deriving(Show)] struct Test { i: int } impl Test { fn new() -> Test { Test {