-
Notifications
You must be signed in to change notification settings - Fork 13.4k
clarify rustc_do_not_const_check
comment
#142528
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
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
Please send a PR against https://github.com/rust-lang/rust-analyzer/ instead. |
Oh, hm.. I thought this was in rust-lang/rust, let me check again |
f058aa8
to
64f5c74
Compare
Fixed |
Heh. Where do we use it for other purposes? May be worth mentioning examples |
Did we? I think there was a proposal to do that and I vehemently opposed it. I don't remember anything ever landing. |
well true, there was a proposal to use it for iterator as a temporary
solution but that wasnt accepted. we can keep the original "always" then.
|
64f5c74
to
a0db28f
Compare
Ok it should now be uncontroversial |
r? oli-obk (but seems good to me) |
@@ -486,7 +486,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[ | |||
rustc_legacy_const_generics, Normal, template!(List: "N"), ErrorFollowing, | |||
INTERNAL_UNSTABLE | |||
), | |||
// Do not const-check this function's body. It will always get replaced during CTFE. | |||
// Do not const-check this function's body. It will always get replaced during CTFE via `hook_special_const_fn`. |
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.
There's no such function in RA so does this comment really make sense here?
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.
Yes, the file is largely a copy of the rustc one.
@bors r+ rollup |
…v, r=RalfJung clarify `rustc_do_not_const_check` comment ~~Given that we have used this attribute for other reasons before it seems appropriate to make this a "usually".~~ Add function name as a pointer cc `@rust-lang/wg-const-eval`
Rollup of 7 pull requests Successful merges: - #138237 (Get rid of `EscapeDebugInner`.) - #140809 (Reduce special casing for the panic runtime) - #141990 (Implement send_signal for unix child processes) - #142082 (Refactor `rustc_attr_data_structures` documentation) - #142125 (Stabilize "file_lock" feature) - #142528 (clarify `rustc_do_not_const_check` comment) - #142530 (use `if let` guards where possible) r? `@ghost` `@rustbot` modify labels: rollup
…v, r=RalfJung clarify `rustc_do_not_const_check` comment ~~Given that we have used this attribute for other reasons before it seems appropriate to make this a "usually".~~ Add function name as a pointer cc ``@rust-lang/wg-const-eval``
Rollup of 8 pull requests Successful merges: - #140809 (Reduce special casing for the panic runtime) - #142082 (Refactor `rustc_attr_data_structures` documentation) - #142125 (Stabilize "file_lock" feature) - #142373 (Fix Debug for Location) - #142414 (ignore `run-make` tests that need `std` on targets without `std`) - #142416 (Assorted bootstrap cleanups (step 2)) - #142431 (Add initial version of snapshot tests to bootstrap) - #142528 (clarify `rustc_do_not_const_check` comment) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 12 pull requests Successful merges: - #141639 (Expose discriminant values in stable_mir) - #142082 (Refactor `rustc_attr_data_structures` documentation) - #142125 (Stabilize "file_lock" feature) - #142236 (Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls) - #142373 (Fix Debug for Location) - #142416 (Assorted bootstrap cleanups (step 2)) - #142431 (Add initial version of snapshot tests to bootstrap) - #142450 (Add documentation on top of `rustc_middle/src/query/mod.rs`) - #142528 (clarify `rustc_do_not_const_check` comment) - #142530 (use `if let` guards where possible) - #142561 (Remove an `njn:` comment accidentaly left behind.) - #142566 (Fix `-nopt` CI jobs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142528 - fee1-dead-contrib:push-rlxklunqkwmv, r=RalfJung clarify `rustc_do_not_const_check` comment ~~Given that we have used this attribute for other reasons before it seems appropriate to make this a "usually".~~ Add function name as a pointer cc ```@rust-lang/wg-const-eval```
Rollup of 12 pull requests Successful merges: - rust-lang#141639 (Expose discriminant values in stable_mir) - rust-lang#142082 (Refactor `rustc_attr_data_structures` documentation) - rust-lang#142125 (Stabilize "file_lock" feature) - rust-lang#142236 (Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls) - rust-lang#142373 (Fix Debug for Location) - rust-lang#142416 (Assorted bootstrap cleanups (step 2)) - rust-lang#142431 (Add initial version of snapshot tests to bootstrap) - rust-lang#142450 (Add documentation on top of `rustc_middle/src/query/mod.rs`) - rust-lang#142528 (clarify `rustc_do_not_const_check` comment) - rust-lang#142530 (use `if let` guards where possible) - rust-lang#142561 (Remove an `njn:` comment accidentaly left behind.) - rust-lang#142566 (Fix `-nopt` CI jobs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 12 pull requests Successful merges: - rust-lang/rust#141639 (Expose discriminant values in stable_mir) - rust-lang/rust#142082 (Refactor `rustc_attr_data_structures` documentation) - rust-lang/rust#142125 (Stabilize "file_lock" feature) - rust-lang/rust#142236 (Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls) - rust-lang/rust#142373 (Fix Debug for Location) - rust-lang/rust#142416 (Assorted bootstrap cleanups (step 2)) - rust-lang/rust#142431 (Add initial version of snapshot tests to bootstrap) - rust-lang/rust#142450 (Add documentation on top of `rustc_middle/src/query/mod.rs`) - rust-lang/rust#142528 (clarify `rustc_do_not_const_check` comment) - rust-lang/rust#142530 (use `if let` guards where possible) - rust-lang/rust#142561 (Remove an `njn:` comment accidentaly left behind.) - rust-lang/rust#142566 (Fix `-nopt` CI jobs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 12 pull requests Successful merges: - rust-lang/rust#141639 (Expose discriminant values in stable_mir) - rust-lang/rust#142082 (Refactor `rustc_attr_data_structures` documentation) - rust-lang/rust#142125 (Stabilize "file_lock" feature) - rust-lang/rust#142236 (Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls) - rust-lang/rust#142373 (Fix Debug for Location) - rust-lang/rust#142416 (Assorted bootstrap cleanups (step 2)) - rust-lang/rust#142431 (Add initial version of snapshot tests to bootstrap) - rust-lang/rust#142450 (Add documentation on top of `rustc_middle/src/query/mod.rs`) - rust-lang/rust#142528 (clarify `rustc_do_not_const_check` comment) - rust-lang/rust#142530 (use `if let` guards where possible) - rust-lang/rust#142561 (Remove an `njn:` comment accidentaly left behind.) - rust-lang/rust#142566 (Fix `-nopt` CI jobs) r? `@ghost` `@rustbot` modify labels: rollup
Given that we have used this attribute for other reasons before it seems appropriate to make this a "usually".Add function name as a pointer
cc @rust-lang/wg-const-eval