-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Lower Guard Patterns to HIR. #134989
Lower Guard Patterns to HIR. #134989
Conversation
Some changes occurred in match checking cc @Nadrieril |
This comment has been minimized.
This comment has been minimized.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
Could you add tests for |
Oof funky case. I think we'd want to reject this at the nameres level? |
Oh wait I thought this PR included nameres, nevermind. That remark will be for the next PR :D |
@bors r+ |
@@ -435,6 +435,9 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> { | |||
|
|||
hir::PatKind::Or(pats) => PatKind::Or { pats: self.lower_patterns(pats) }, | |||
|
|||
// FIXME(guard_patterns): implement guard pattern lowering | |||
hir::PatKind::Guard(pat, _) => self.lower_pattern(pat).kind, |
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.
Maybe emit an error here instead until the correct lowering is implemented?
…r=oli-obk Lower Guard Patterns to HIR. Implements lowering of [guard patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see the [tracking issue](rust-lang#129967)) to HIR.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#131146 (Stop clearing box's drop flags early) - rust-lang#133810 (remove unnecessary `eval_verify_bound`) - rust-lang#134745 (Normalize each signature input/output in `typeck_with_fallback` with its own span) - rust-lang#134989 (Lower Guard Patterns to HIR.) - rust-lang#135149 (Use a post-monomorphization typing env when mangling components that come from impls) - rust-lang#135171 (rustdoc: use stable paths as preferred canonical paths) - rust-lang#135200 (rustfmt: drop nightly-gating of the `--style-edition` flag registration) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#133810 (remove unnecessary `eval_verify_bound`) - rust-lang#134745 (Normalize each signature input/output in `typeck_with_fallback` with its own span) - rust-lang#134989 (Lower Guard Patterns to HIR.) - rust-lang#135149 (Use a post-monomorphization typing env when mangling components that come from impls) - rust-lang#135171 (rustdoc: use stable paths as preferred canonical paths) - rust-lang#135200 (rustfmt: drop nightly-gating of the `--style-edition` flag registration) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134989 - max-niederman:guard-patterns-hir, r=oli-obk Lower Guard Patterns to HIR. Implements lowering of [guard patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see the [tracking issue](rust-lang#129967)) to HIR.
…r=oli-obk Lower Guard Patterns to HIR. Implements lowering of [guard patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see the [tracking issue](rust-lang#129967)) to HIR.
Implements lowering of guard patterns (see the tracking issue) to HIR.