Skip to content

Commit

Permalink
BE: Remove On field from AnyCallBackCtx
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alanz authored and facebook-github-bot committed Mar 27, 2024
1 parent db161fc commit 690c4e0
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions crates/hir/src/fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ pub enum On {

#[derive(Debug)]
pub struct AnyCallBackCtx<'a> {
pub on: On,
pub in_macro: Option<HirIdx>,
pub parents: &'a Vec<HirIdx>,
pub item_id: AnyExprId,
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 690c4e0

Please sign in to comment.