rust/src/test/compile-fail/issue-2825.rs
2012-08-17 10:13:45 -07:00

14 lines
202 B
Rust

struct example {
let x: int;
new() { //~ ERROR First constructor declared here
self.x = 1;
}
new(x_: int) {
self.x = x_;
}
}
fn main(_args: ~[~str]) {
let e: example = example();
}