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
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
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)]
>
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
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 {