Fix a dangling reference in rustc_thread_pool by cuviper · Pull Request #146799 · rust-lang/rust (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we added the NOTE in rayon before there was much consensus on proper SAFETY comments. It's definitely a safety-relevant comment, even if it's not directly justifying this unsafe.

(Personally, I would have used a single unsafe block around all of this, but this was also added after the port from rayon. Originally, it's still using the unsafe fn context for inner unsafe too.)