rust/src/test/compile-fail/regions-in-rsrcs.rs
2012-07-13 10:20:50 -07:00

19 lines
428 B
Rust

class yes0 {
let x: &uint;
new(x: &uint) { self.x = x; }
drop {}
}
class yes1 {
let x: &self/uint;
new(x: &self/uint) { self.x = x; }
drop {}
}
class yes2 {
let x: &foo/uint; //~ ERROR named regions other than `self` are not allowed as part of a type declaration
new(x: &foo/uint) { self.x = x; } //~ ERROR named regions other than `self` are not allowed as part of a type declaration
drop {}
}
fn main() {}