Closed
Description
#[deriving(ToStr)]
struct Foo<A>(A);
struct Bar;
impl ToStr for Bar {
fn to_str(&self) -> ~str {
~"some string"
}
}
fn main() {
println(Bar.to_str());
println(Foo(Bar).to_str());
}
prints:
some string
{__field__: {}}
Ignoring the strange struct printing, it should probably print:
some string
{__field__: some string}
i.e. use the ToStr
impl of any generics.
Metadata
Metadata
Assignees
Labels
No labels