summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_hir/src/pat_util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_hir/src/pat_util.rs')
-rw-r--r--compiler/rustc_hir/src/pat_util.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_hir/src/pat_util.rs b/compiler/rustc_hir/src/pat_util.rs
index e870aa543..838c123f8 100644
--- a/compiler/rustc_hir/src/pat_util.rs
+++ b/compiler/rustc_hir/src/pat_util.rs
@@ -2,7 +2,6 @@ use crate::def::{CtorOf, DefKind, Res};
use crate::def_id::DefId;
use crate::hir::{self, BindingAnnotation, ByRef, HirId, PatKind};
use rustc_data_structures::fx::FxHashSet;
-use rustc_span::hygiene::DesugaringKind;
use rustc_span::symbol::Ident;
use rustc_span::Span;
@@ -136,14 +135,4 @@ impl hir::Pat<'_> {
});
result
}
-
- /// If the pattern is `Some(<pat>)` from a desugared for loop, returns the inner pattern
- pub fn for_loop_some(&self) -> Option<&Self> {
- if self.span.desugaring_kind() == Some(DesugaringKind::ForLoop) {
- if let hir::PatKind::Struct(_, [pat_field], _) = self.kind {
- return Some(pat_field.pat);
- }
- }
- None
- }
}