rust/src/test/run-pass/regions-self-impls.rs
2012-07-13 10:20:50 -07:00

13 lines
220 B
Rust

type clam = { chowder: &int };
impl clam for clam {
fn get_chowder() -> &self/int { ret self.chowder; }
}
fn main() {
let clam = { chowder: &3 };
log(debug, *clam.get_chowder());
clam.get_chowder();
}