rust/tests/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
159 B
Rust
Raw Normal View History

#![feature(thread_local)]
#[thread_local]
static FOO: u8 = 3;
fn assert_static(_t: &'static u8) {}
fn main() {
assert_static(&FOO); //~ ERROR [E0712]
}