rust/src/test/run-pass/struct-field-assignability.rs
2013-12-12 00:49:57 -08:00

11 lines
133 B
Rust

#[feature(managed_boxes)];
struct Foo<'a> {
x: &'a int
}
pub fn main() {
let f = Foo { x: @3 };
assert_eq!(*f.x, 3);
}