]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs
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.
6 // compile-flags:-Zverbose
8 fn foo
<'a
, 'b
>(x
: &'a
u32, y
: &'b
u32) -> &'b
u32 {
10 //~^ ERROR lifetime may not live long enough