]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / borrowck / borrowck-thread-local-static-borrow-outlives-fn.rs
1 #![feature(thread_local)]
2
3 #[thread_local]
4 static FOO: u8 = 3;
5
6 fn assert_static(_t: &'static u8) {}
7 fn main() {
8      assert_static(&FOO); //~ ERROR [E0712]
9 }