2012-08-09 11:59:50 -05:00
|
|
|
struct invariant {
|
2012-09-07 16:50:47 -05:00
|
|
|
f: @[mut &int]
|
2012-08-09 11:59:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn to_same_lifetime(bi: invariant/&r) {
|
|
|
|
let bj: invariant/&r = bi;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn to_shorter_lifetime(bi: invariant/&r) {
|
|
|
|
let bj: invariant/&blk = bi; //~ ERROR mismatched types
|
|
|
|
}
|
|
|
|
|
|
|
|
fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
|
|
|
|
bi //~ ERROR mismatched types
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|