mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
17 lines
302 B
Rust
17 lines
302 B
Rust
//@ 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();
|
|
});
|
|
}
|