rust/src/test/run-pass/class-str-field.rs
2012-09-07 14:02:33 -07:00

15 lines
145 B
Rust

struct cat {
name : ~str,
}
fn cat(in_name: ~str) -> cat {
cat {
name: in_name
}
}
fn main() {
let nyan = cat(~"nyan");
}