]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-29522.rs
Rollup merge of #92942 - Xaeroxe:raw_arg, r=dtolnay
[rust.git] / src / test / ui / issues / issue-29522.rs
1 // run-pass
2 #![allow(unused_variables)]
3 // check that we don't accidentally capture upvars just because their name
4 // occurs in a path
5
6 fn assert_static<T: 'static>(_t: T) {}
7
8 mod foo {
9     pub fn scope() {}
10 }
11
12 fn main() {
13     let scope = &mut 0;
14     assert_static(|| {
15        foo::scope();
16     });
17 }