2012-04-05 09:10:14 -07:00
|
|
|
fn ignore<T>(t: T) {}
|
|
|
|
|
2012-07-12 09:36:56 -07:00
|
|
|
fn nested(x: &x/int) {
|
2012-04-05 09:10:14 -07:00
|
|
|
let y = 3;
|
|
|
|
let mut ay = &y;
|
|
|
|
|
2012-07-12 09:36:56 -07:00
|
|
|
ignore(fn&(z: &z/int) {
|
2012-04-05 09:10:14 -07:00
|
|
|
ay = x;
|
|
|
|
ay = &y;
|
2012-07-31 21:08:24 -07:00
|
|
|
ay = z; //~ ERROR mismatched types
|
2012-04-05 09:10:14 -07:00
|
|
|
});
|
|
|
|
|
2012-07-12 09:36:56 -07:00
|
|
|
ignore(fn&(z: &z/int) -> &z/int {
|
2012-08-01 17:30:05 -07:00
|
|
|
if false { return x; } //~ ERROR mismatched types
|
|
|
|
if false { return ay; } //~ ERROR mismatched types
|
|
|
|
return z;
|
2012-04-05 09:10:14 -07:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|