From 690c4e0a04cd437bf0c622c3d96843e8fba3c66d Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Wed, 27 Mar 2024 07:08:28 -0700 Subject: [PATCH] BE: Remove `On` field from `AnyCallBackCtx` Summary: It was only ever set to `On::Entry`, so adds no value and causes confusion. Reviewed By: robertoaloi Differential Revision: D55238441 fbshipit-source-id: e731ab99433b7763eb9d5bfa8735adee0e03a851 --- crates/hir/src/fold.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/crates/hir/src/fold.rs b/crates/hir/src/fold.rs index 399b9f8f81..8a423ffcef 100644 --- a/crates/hir/src/fold.rs +++ b/crates/hir/src/fold.rs @@ -295,7 +295,6 @@ pub enum On { #[derive(Debug)] pub struct AnyCallBackCtx<'a> { - pub on: On, pub in_macro: Option, pub parents: &'a Vec, pub item_id: AnyExprId, @@ -501,7 +500,6 @@ impl<'a, T> FoldCtx<'a, T> { }); let expr = &self.body[expr_id]; let ctx = AnyCallBackCtx { - on: On::Entry, in_macro: self.in_macro(), parents: &self.parents, item_id: AnyExprId::Expr(expr_id), @@ -716,7 +714,6 @@ impl<'a, T> FoldCtx<'a, T> { }); let pat = &self.body[pat_id]; let ctx = AnyCallBackCtx { - on: On::Entry, in_macro: self.in_macro(), parents: &self.parents, item_id: AnyExprId::Pat(pat_id), @@ -828,7 +825,6 @@ impl<'a, T> FoldCtx<'a, T> { }); let term = &self.body[term_id]; let ctx = AnyCallBackCtx { - on: On::Entry, in_macro: self.in_macro(), parents: &self.parents, item_id: AnyExprId::Term(term_id), @@ -884,7 +880,6 @@ impl<'a, T> FoldCtx<'a, T> { }); let type_expr = &self.body[type_expr_id]; let ctx = AnyCallBackCtx { - on: On::Entry, in_macro: self.in_macro(), parents: &self.parents, item_id: AnyExprId::TypeExpr(type_expr_id),