book icon indicating copy to clipboard operation
book copied to clipboard

Heads up for target_feature_11

Open ehuss opened this issue 9 months ago • 1 comments
trafficstars

Just wanted to give you a heads up that there may be a not entirely obvious change in Rust 1.86. The target_feature_11 change adds a new ability for Unsafe superpowers, which is to call safe functions with target features the caller function itself does not enable (particularly applicable to main or anything called from it, since main cannot have target features).

Previously it was required that these functions always be unsafe, but now they can be safe and be called safely if the caller enables the same features.

There's more information in https://github.com/rust-lang/reference/pull/1720 and https://github.com/rust-lang/rust/pull/134090.

ehuss avatar Feb 13 '25 16:02 ehuss

Thanks for the note! I’ll take a look and see if/how we want to integrate!

chriskrycho avatar Feb 25 '25 18:02 chriskrycho