You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0133]: use of mutable static is unsafe and requires unsafe function or block
--> src/main.rs:4:20
|
4 | println!("{}", ::nameof::name_of!(TEST));
| ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
|
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
= note: this error originates in the macro `::nameof::name_of` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0133`.
error: could not compile `bug-repro-rust-nameof-unsafe` due to previous error
The text was updated successfully, but these errors were encountered:
Given this code:
the compiler fails with this error:
The text was updated successfully, but these errors were encountered: