-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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_eval: implies_by
in rustc_const_unstable
#107801
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
Haven’t tried understanding the code in actual detail, but I’m wondering why the implications are separated for the const and non-const case. Same feature flag could gate some normal While I’m at it, commenting on the general design… one small downside of the Feel free to ignore this second part of the comment though, as it’s not directly relevant to the PR at hand, I suppose. (And also the use-case should be rather uncommon (and we’re still talking about unstable features anyways), so it’s not a pressing issue.) |
Extend support for `implies_by` (from `#[stable]` and `#[unstable]`) to `#[rustc_const_stable]` and `#[rustc_const_unstable]`. Signed-off-by: David Wood <david.wood@huawei.com>
b9dd340
to
9127834
Compare
This makes sense, I've updated it to this.
I think I went with the current directionality for the advantage you've noted. Extending the current approach to accept a list of features makes most sense if we were to do this (though I'm not sure if it's worth it if there isn't a need for that). |
Thanks for the quick response. While I’m at it, more small general thoughts where just asking seems faster than me trying to figure it out from the code of testing: Given that previously, apparently |
(hope it's fine to reroll reviewer, was autoassigned) r? compiler |
Would be nice if the stability and const stability code was a little more unified in the future. |
… r=Nilstrieb const_eval: `implies_by` in `rustc_const_unstable` Fixes rust-lang#107605. Extend support for `implies_by` (from `#[stable]` and `#[unstable]`) to `#[rustc_const_stable]` and `#[rustc_const_unstable]`. cc `@steffahn`
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#107801 (const_eval: `implies_by` in `rustc_const_unstable`) - rust-lang#108750 (Fix `ObligationCtxt::sub`) - rust-lang#108780 (Add regression tests for issue 70919) - rust-lang#108786 (Check for free regions in MIR validation) - rust-lang#108790 (Do not ICE when interpreting a cast between non-monomorphic types) - rust-lang#108803 (Do not ICE when failing to normalize in ConstProp.) - rust-lang#108807 (Emit the suspicious_auto_trait_impls for negative impls as well) - rust-lang#108812 (Add regression test for rust-lang#98444) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #107605.
Extend support for
implies_by
(from#[stable]
and#[unstable]
) to#[rustc_const_stable]
and#[rustc_const_unstable]
.cc @steffahn