-
Notifications
You must be signed in to change notification settings - Fork 13.4k
const-check: stop recommending the use of rustc_allow_const_fn_unstable #141559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const-check: stop recommending the use of rustc_allow_const_fn_unstable #141559
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with or without
@@ -424,8 +424,7 @@ const_eval_unstable_in_stable_exposed = | |||
.unstable_sugg = if the {$is_function_call2 -> | |||
[true] caller | |||
*[false] function | |||
} is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do) | |||
.bypass_sugg = otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval) | |||
} is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]` (this is what you probably want to do) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the parenthetical necessary now, since there's no longer two alternatives?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondered the same thing and thought it could still be useful... but OTOH when there's only one suggestion, then I guess "obviously" this is what one wants to do?
a263cb1
to
cf9ac0e
Compare
@bors r=compiler-errors rollup |
…_unstable, r=compiler-errors const-check: stop recommending the use of rustc_allow_const_fn_unstable I have seen way too many people see the compiler suggest this attribute and then just apply it without a second thought. This is bad. So let's just stop recommending it; for the rare case where someone needs it, they'll eventually ask us and that way we can be sure that it is truly needed. The dev-guide still also explains `rustc_allow_const_fn_unstable`. Cc `@rust-lang/wg-const-eval`
Rollup of 9 pull requests Successful merges: - #134696 (Implement `normalize_lexically`) - #138744 (Add methods to TCP and UDP sockets to modify hop limit (refresh of #94678)) - #140539 (Simplify `attribute_groups`) - #140863 ([rustdoc] Unify type aliases rendering with other ADT) - #140936 (Clarify WTF-8 safety docs) - #140952 (Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace) - #141472 (Attempt to improve the `std::fs::create_dir_all` docs related to atomicity) - #141502 (ci: move PR job x86_64-gnu-tools to codebuild) - #141559 (const-check: stop recommending the use of rustc_allow_const_fn_unstable) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #134696 (Implement `normalize_lexically`) - #140539 (Simplify `attribute_groups`) - #140863 ([rustdoc] Unify type aliases rendering with other ADT) - #140936 (Clarify WTF-8 safety docs) - #140952 (Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace) - #141472 (Attempt to improve the `std::fs::create_dir_all` docs related to atomicity) - #141502 (ci: move PR job x86_64-gnu-tools to codebuild) - #141559 (const-check: stop recommending the use of rustc_allow_const_fn_unstable) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #141559 - RalfJung:less-rustc_allow_const_fn_unstable, r=compiler-errors const-check: stop recommending the use of rustc_allow_const_fn_unstable I have seen way too many people see the compiler suggest this attribute and then just apply it without a second thought. This is bad. So let's just stop recommending it; for the rare case where someone needs it, they'll eventually ask us and that way we can be sure that it is truly needed. The dev-guide still also explains `rustc_allow_const_fn_unstable`. Cc ``@rust-lang/wg-const-eval``
I have seen way too many people see the compiler suggest this attribute and then just apply it without a second thought. This is bad. So let's just stop recommending it; for the rare case where someone needs it, they'll eventually ask us and that way we can be sure that it is truly needed. The dev-guide still also explains
rustc_allow_const_fn_unstable
.Cc @rust-lang/wg-const-eval