diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-07-02 12:23:38 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-02 12:23:38 +0530 |
| commit | d287726aa0ead175b798b0991ba7a49eb9a2ca4c (patch) | |
| tree | 6db63d5c80285bda71db35f92c31217215e4d688 /compiler/rustc_mir_build | |
| parent | 9a6fa4f118d88991458549464d960aa1e495541b (diff) | |
| parent | ec82bc199611e7f1cf3acd612a65eed81d22636b (diff) | |
| download | rust-d287726aa0ead175b798b0991ba7a49eb9a2ca4c.tar.gz rust-d287726aa0ead175b798b0991ba7a49eb9a2ca4c.zip | |
Rollup merge of #98639 - camsteffen:no-node-binding, r=compiler-errors
Factor out `hir::Node::Binding`
Diffstat (limited to 'compiler/rustc_mir_build')
| -rw-r--r-- | compiler/rustc_mir_build/src/build/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/cx/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_build/src/build/mod.rs b/compiler/rustc_mir_build/src/build/mod.rs index cdacf3ad892..e27761381f6 100644 --- a/compiler/rustc_mir_build/src/build/mod.rs +++ b/compiler/rustc_mir_build/src/build/mod.rs @@ -997,7 +997,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { continue; }; let pat = match tcx.hir().get(arg.pat.hir_id) { - Node::Pat(pat) | Node::Binding(pat) => pat, + Node::Pat(pat) => pat, node => bug!("pattern became {:?}", node), }; let pattern = pat_from_hir(tcx, self.param_env, self.typeck_results, pat); diff --git a/compiler/rustc_mir_build/src/thir/cx/mod.rs b/compiler/rustc_mir_build/src/thir/cx/mod.rs index 62f6a43d1f2..35a0afd6813 100644 --- a/compiler/rustc_mir_build/src/thir/cx/mod.rs +++ b/compiler/rustc_mir_build/src/thir/cx/mod.rs @@ -80,7 +80,7 @@ impl<'tcx> Cx<'tcx> { #[tracing::instrument(level = "debug", skip(self))] pub(crate) fn pattern_from_hir(&mut self, p: &hir::Pat<'_>) -> Pat<'tcx> { let p = match self.tcx.hir().get(p.hir_id) { - Node::Pat(p) | Node::Binding(p) => p, + Node::Pat(p) => p, node => bug!("pattern became {:?}", node), }; pat_from_hir(self.tcx, self.param_env, self.typeck_results(), p) |
