mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00

Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
13 lines
239 B
Rust
13 lines
239 B
Rust
//@ run-pass
|
|
// Regression test for issue #10682
|
|
// Nested `proc` usage can't use outer owned data
|
|
|
|
|
|
fn work(_: Box<isize>) {}
|
|
fn foo<F:FnOnce()>(_: F) {}
|
|
|
|
pub fn main() {
|
|
let a = Box::new(1);
|
|
foo(move|| { foo(move|| { work(a) }) })
|
|
}
|