-
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
Deny FnDef
in patterns
#114668
Deny FnDef
in patterns
#114668
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
f89c77e
to
3a6725e
Compare
This comment has been minimized.
This comment has been minimized.
3a6725e
to
7694519
Compare
LGTM, assuming this shouldn't be an error. AFAIR, "exotic" types in patterns produced errors some time ago, but maybe they do not now? |
This isn't waiting on author -- I'm waiting for advice on how to proceed w/ this PR 😸 @rustbot ready |
That is to say, I'm happy to either:
|
In don't see the place which @cjgillot is talking about in #114668 (comment), but let's make it an error for now. |
7694519
to
1f42be6
Compare
BinOp::Eq
on pattern match equality test for FnDef
typeFnDef
in patterns
Some changes might have occurred in exhaustiveness checking cc @Nadrieril |
@rustbot ready |
@bors r+ |
⌛ Testing commit 1f42be6 with merge a77e393758d35a955e9f532caf68def68a5ca946... |
💔 Test failed - checks-actions |
@bors retry |
…trochenkov Deny `FnDef` in patterns We can only see these via `const { .. }` patterns, which are unstable. cc rust-lang#76001 (tracking issue for inline const pats) Fixes rust-lang#114658 Fixes rust-lang#114659
…trochenkov Deny `FnDef` in patterns We can only see these via `const { .. }` patterns, which are unstable. cc rust-lang#76001 (tracking issue for inline const pats) Fixes rust-lang#114658 Fixes rust-lang#114659
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#114588 (Improve docs for impl Default for ExitStatus) - rust-lang#114619 (Fix pthread_attr_union layout on Wasi) - rust-lang#114644 (Point out expectation even if we have `TypeError::RegionsInsufficientlyPolymorphic`) - rust-lang#114668 (Deny `FnDef` in patterns) - rust-lang#114819 (Point at return type when it influences non-first `match` arm) - rust-lang#114826 (Fix typos) - rust-lang#114837 (add missing feature(error_in_core)) - rust-lang#114853 (Migrate GUI colors test to original CSS color format) r? `@ghost` `@rustbot` modify labels: rollup
We can only see these via
const { .. }
patterns, which are unstable.cc #76001 (tracking issue for inline const pats)
Fixes #114658
Fixes #114659