Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/hir.rs')
-rw-r--r--crates/hir-def/src/hir.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/crates/hir-def/src/hir.rs b/crates/hir-def/src/hir.rs
index 77d879a77b..500e880061 100644
--- a/crates/hir-def/src/hir.rs
+++ b/crates/hir-def/src/hir.rs
@@ -501,25 +501,9 @@ pub struct Binding {
pub name: Name,
pub mode: BindingAnnotation,
pub definitions: SmallVec<[PatId; 1]>,
- /// Id of the closure/generator that owns this binding. If it is owned by the
- /// top level expression, this field would be `None`.
- pub owner: Option<ExprId>,
pub problems: Option<BindingProblems>,
}
-impl Binding {
- pub fn is_upvar(&self, relative_to: ExprId) -> bool {
- match self.owner {
- Some(x) => {
- // We assign expression ids in a way that outer closures will receive
- // a lower id
- x.into_raw() < relative_to.into_raw()
- }
- None => true,
- }
- }
-}
-
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct RecordFieldPat {
pub name: Name,