-
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
fix matches!
and assert_matches!
on edition 2021
#85678
Conversation
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
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.
Thanks! Is it possible to get a test for this? I believe the ui test harness supports setting the edition that tests are built with.
Lines 2 to 3 in fbf1b1a
// edition:2021 | |
// compile-flags: -Zunstable-options |
I added a regression test. |
I haven't seen any discussion about proceeding with this solution for #84429. As of this morning, there is work going on to fix the hygiene problem. Was there some discussion on this? |
|
Ah, forgot about that! I do believe they should be equivalent, even when std is migrated to 2021, so I don't think it matters much one way or the other. Just a forewarning, I think this may conflict with #85272, so the two PRs will be racing one another. |
@bors r+ |
📌 Commit 824c743 has been approved by |
Note that this PR only fixes the problem for the specific PR #85709 fixes this for all macro definitions. |
Rollup of 8 pull requests Successful merges: - rust-lang#85478 (Disallow shadowing const parameters) - rust-lang#85625 (Prevent double drop in `Vec::dedup_by` if a destructor panics) - rust-lang#85627 (Fix a few details in THIR unsafeck) - rust-lang#85633 (Post-monomorphization errors traces MVP) - rust-lang#85670 (Remove arrays/IntoIterator message from Iterator trait.) - rust-lang#85678 (fix `matches!` and `assert_matches!` on edition 2021) - rust-lang#85679 (Remove num_as_ne_bytes feature) - rust-lang#85712 (Fix typo in core::array::IntoIter comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Previously this code failed to compile on edition 2021. (Playground)