]>
Commit | Line | Data |
---|---|---|
8faf50e0 XL |
1 | // Test that the NLL `relate_tys` code correctly deduces that a |
2 | // function returning always its first argument can be upcast to one | |
3 | // that returns either first or second argument. | |
4 | // | |
dfeec247 | 5 | // check-pass |
8faf50e0 | 6 | // compile-flags:-Zno-leak-check |
ea8adc8c | 7 | |
8faf50e0 XL |
8 | fn make_it() -> for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32 { |
9 | panic!() | |
223e47cc | 10 | } |
2c00a5a8 | 11 | |
8faf50e0 XL |
12 | fn main() { |
13 | let a: for<'a> fn(&'a u32, &'a u32) -> &'a u32 = make_it(); | |
14 | drop(a); | |
15 | } |