Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upReplace uses of "static mut" with UnsafeCell #26550
Comments
|
|
|
I did the examining. Here is what I found, in increasing levels of worrisome. TL;DR: see the parts in bold.
|
Remove support for energy and heartbeats profiling Both are disabled by default (energy at compile-time, heartbeats with a run-time option). Neither is tested of CI. Neither has been used in a long time. They might have Undefined Behavior: #26550 (comment). They each depend on a mostly-unmaintained C library. The thread-safety expectation of those libraries are unknown.
Given rust-lang/rust#53639, it seems safer to rely on tools that won't let us accidentally alias mutable data like UnsafeCell.