rust/src/test/run-pass/regions-self-impls.rs
2012-08-08 18:19:24 -07:00

17 lines
285 B
Rust

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