blob: 3d2de5ef63a8cbb0792d8249aafe355753ab3eca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// run-pass
#![allow(unused_variables)]
// check that we don't accidentally capture upvars just because their name
// occurs in a path
fn assert_static<T: 'static>(_t: T) {}
mod foo {
pub fn scope() {}
}
fn main() {
let scope = &mut 0;
assert_static(|| {
foo::scope();
});
}
|