rust/src/test/run-pass/issue-980.rs

14 lines
190 B
Rust
Raw Normal View History

2011-09-27 01:24:53 -05:00
tag maybe_pointy {
no_pointy;
yes_pointy(@pointy);
}
type pointy = {
mutable x : maybe_pointy
};
fn main() {
let m = @{ mutable x : no_pointy };
m.x = yes_pointy(m);
}