2012-04-05 11:10:14 -05:00
|
|
|
fn ignore<T>(t: T) {}
|
|
|
|
|
2012-07-12 11:36:56 -05:00
|
|
|
fn nested(x: &x/int) {
|
2012-04-05 11:10:14 -05:00
|
|
|
let y = 3;
|
2012-08-13 17:06:13 -05:00
|
|
|
let mut ay = &y; //~ ERROR cannot infer an appropriate lifetime
|
2012-04-05 11:10:14 -05:00
|
|
|
|
2012-07-12 11:36:56 -05:00
|
|
|
ignore(fn&(z: &z/int) {
|
2012-04-05 11:10:14 -05:00
|
|
|
ay = x;
|
2012-08-13 17:06:13 -05:00
|
|
|
ay = &y; //~ ERROR cannot infer an appropriate lifetime
|
|
|
|
ay = z;
|
2012-04-05 11:10:14 -05:00
|
|
|
});
|
|
|
|
|
2012-07-12 11:36:56 -05:00
|
|
|
ignore(fn&(z: &z/int) -> &z/int {
|
2012-08-01 19:30:05 -05:00
|
|
|
if false { return x; } //~ ERROR mismatched types
|
2012-08-13 17:06:13 -05:00
|
|
|
if false { return ay; }
|
2012-08-01 19:30:05 -05:00
|
|
|
return z;
|
2012-04-05 11:10:14 -05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|