]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-36260.rs
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.git] / src / test / ui / issues / issue-36260.rs
1 // run-pass
2 // Make sure this compiles without getting a linker error because of missing
3 // drop-glue because the collector missed adding drop-glue for the closure:
4
5 fn create_fn() -> Box<dyn Fn()> {
6     let text = String::new();
7
8     Box::new(move || { let _ = &text; })
9 }
10
11 fn main() {
12     let _ = create_fn();
13 }