rust/src/test/compile-fail/regions-in-rsrcs.rs

19 lines
569 B
Rust
Raw Normal View History

resource no0(x: &uint) { //! ERROR to use region types here, the containing type must be declared with a region bound
}
resource no1(x: &self.uint) { //! ERROR to use region types here, the containing type must be declared with a region bound
}
resource no2(x: &foo.uint) { //! ERROR named regions other than `self` are not allowed as part of a type declaration
}
2012-04-19 22:05:50 -05:00
resource yes0/&(x: &uint) {
}
2012-04-19 22:05:50 -05:00
resource yes1/&(x: &self.uint) {
}
2012-04-19 22:05:50 -05:00
resource yes2/&(x: &foo.uint) { //! ERROR named regions other than `self` are not allowed as part of a type declaration
}
fn main() {}