s390x-unknown-linux-gnu: cfg!(target_feature = "backchain") is always true · Issue #129927 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
#127506 introduced what I think is a logic error: cfg!(target_feature = "backchain")
is now always true
on s390x targets, even if the feature gate is not set. I verified this with Miri, which shares the cfg
logic with rustc so it should be a correct test.
This should print false
when built without -Ctarget-feature=+backchain
(as the feature seems off-by-default), but prints true
instead:
fn main() { dbg!(cfg!(target_feature = "backchain")); }
Cc @liushuyu