rust/src/test/run-pass/struct-field-assignability.rs
2013-05-03 20:01:42 -04:00

9 lines
110 B
Rust

struct Foo<'self> {
x: &'self int
}
pub fn main() {
let f = Foo { x: @3 };
assert!(*f.x == 3);
}