compiler/rustc_error_codes/src/error_codes/E0712.md MARKDOWN 20 lines View on github.com → Search inside
1A borrow of a thread-local variable was made inside a function which outlived2the lifetime of the function.34Erroneous code example:56```compile_fail,E07127#![feature(thread_local)]89#[thread_local]10static FOO: u8 = 3;1112fn main() {13    let a = &FOO; // error: thread-local variable borrowed past end of function1415    std::thread::spawn(move || {16        println!("{}", a);17    });18}19```

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.