-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustc_mir: follow FalseUnwind's real_target edge in qualify_consts. #62274
Conversation
@eddyb Can you follow up with a PR to the reference as well? |
The reference? Why? This was an implementation bug, any code that works now used to be allowed, and any assumption that it wasn't supposed to be allowed was incorrect. |
@eddyb Because the reference says nothing about loops that immediately break being allowed in const contexts, https://doc.rust-lang.org/nightly/reference/const_eval.html; and neither does it say anything about const functions either, https://doc.rust-lang.org/nightly/reference/items/functions.html#const-functions. Speaking of const functions, can you account for
(General note: what is "supposed to be" is decided by the language team) |
@Centril I'm only fixing a bug and bringing the behavior back to its previous state. To be clear: MIR constructs like r? @pnkfelix |
Oh, also, cc @oli-obk this might need |
☔ The latest upstream changes (presumably #61988) made this pull request unmergeable. Please resolve the merge conflicts. |
I agree with this. |
r=me once merge conflict is resolved. |
@bors rollup |
a8dc3d9
to
baa9efb
Compare
@bors r=pnkfelix |
📌 Commit baa9efb has been approved by |
rustc_mir: follow FalseUnwind's real_target edge in qualify_consts. As far as I can tell, this was accidentally omitted from rust-lang#47802. Fixes rust-lang#62272. r? @matthewjasper or @nikomatsakis
Rollup of 12 pull requests Successful merges: - #61535 (Coherence test when a generic type param has a default value from an associated type) - #62274 (rustc_mir: follow FalseUnwind's real_target edge in qualify_consts.) - #62431 (Add messages to `Option`'s and `Result`'s `must_use` annotation for `is_*`) - #62453 (in which we suggest anonymizing single-use lifetimes in paths ) - #62568 (Replace unsafe_destructor_blind_to_params with may_dangle) - #62578 (Add test for #49919) - #62595 (Document that the crate keyword refers to the project root) - #62599 (move mem::uninitialized deprecation back by 1 release, to 1.39) - #62605 (Emit dropped unemitted errors to aid in ICE debugging) - #62607 (Correctly break out of recovery loop) - #62608 (`async unsafe fn` tests) - #62623 (downgrade indirect_structural_match lint to allow) Failed merges: r? @ghost
As far as I can tell, this was accidentally omitted from #47802.
Fixes #62272.
r? @matthewjasper or @nikomatsakis