Skip to content

Commit da4f189

Browse files
committed
Auto merge of #12364 - AlexTMjugador:patch-1, r=ehuss
Replace invalid `panic_unwind` std feature with `panic-unwind` ### What does this PR try to resolve? The documentation for the unstable `build-std-features` flag mentions that a default-enabled feature for `std` is `panic_unwind`. However, as of 2023-07-16, that feature does not even exist in the latest nightlies: ![Cargo error shown when trying to use the `panic_unwind` feature](https://github.com/rust-lang/cargo/assets/7822554/daeec810-0cd9-4a6d-ab54-a6336704cc08) [The `std` `Cargo.toml`](https://github.com/rust-lang/rust/blob/master/library/std/Cargo.toml#L54-L79) does not contain the `panic_unwind` feature either, but it defines a `panic-unwind` feature, which works as intended with the `build-std-features` flag. Therefore, let's update the documentation to refer to the intended feature instead, which improves its accuracy and reduces developer time waste. ### How should we test and review this PR? Run e.g. `cargo build --release -Z build-std -Z build-std-features=panic-unwind --target x86_64-unknown-linux-gnu` instead of `cargo build --release -Z build-std -Z build-std-features=panic_unwind --target x86_64-unknown-linux-gnu`, and watch how the first one works as intended but the second one just shows an error.
2 parents 8461660 + b8ac2f6 commit da4f189

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/src/reference/unstable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ the tracking repository, and if it's not there please file a new issue!
399399
This flag is a sibling to the `-Zbuild-std` feature flag. This will configure
400400
the features enabled for the standard library itself when building the standard
401401
library. The default enabled features, at this time, are `backtrace` and
402-
`panic_unwind`. This flag expects a comma-separated list and, if provided, will
402+
`panic-unwind`. This flag expects a comma-separated list and, if provided, will
403403
override the default list of features enabled.
404404

405405
### binary-dep-depinfo

0 commit comments

Comments
 (0)