]>
Commit | Line | Data |
---|---|---|
abe05a73 XL |
1 | // Basic test for free regions in the NLL code. This test ought to |
2 | // report an error due to a reborrowing constraint. Right now, we get | |
3 | // a variety of errors from the older, AST-based machinery (notably | |
4 | // borrowck), and then we get the NLL error at the end. | |
5bcae85e | 5 | |
923072b8 | 6 | // compile-flags:-Zverbose |
5bcae85e | 7 | |
abe05a73 XL |
8 | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { |
9 | &*x | |
9fa01778 | 10 | //~^ ERROR lifetime may not live long enough |
5bcae85e | 11 | } |
a7813a04 | 12 | |
9fa01778 | 13 | fn main() {} |