]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-51351.rs
Auto merge of #105145 - Ayush1325:sequential-remote-server, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / issue-51351.rs
1 //
2 // Regression test for #51351 and #52133: In the case of #51351,
3 // late-bound regions (like 'a) that were unused within the arguments of
4 // a function were overlooked and could case an ICE. In the case of #52133,
5 // LBR defined on the creator function needed to be added to the free regions
6 // of the closure, as they were not present in the closure's generic
7 // declarations otherwise.
8 //
9 // check-pass
10
11 fn creash<'a>() {
12     let x: &'a () = &();
13 }
14
15 fn produce<'a>() {
16    move || {
17         let x: &'a () = &();
18    };
19 }
20
21 fn main() {}