Test nested `proc` can access outer owned data

Fixes #10682
auto merge of #12450 : FlaPer87/rust/issue-10682, r=alexcrichton

Fixes #10682