]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-36260.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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 }