-Zharden-sls flag (target modifier) added to enable mitigation against straight line speculation (SLS) by azhogin · Pull Request #136597 · 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.
Sorry, I think we were unclear. We don't want to change all instances of the "forbidden target feature" warning into hard errors, we just want this new instance of it to be a hard error.
The reason these are currently a warning is because of backwards compatibly where previous stable compilers allowed these features to be specified. However, harden-sls is a new feature and so there isn't a backwards compatibility requirement. As such, it makes sense to treat invalid uses as a hard error rather than an ignorable warning.
This probably means there needs to be a new level of Stability that generates an error instead of a warning and then you can use that instead of Stability::Forbidden.