Skip to content

Commit 3c45176

Browse files
committed
Expose some LoweringContext methods.
1 parent 43105c1 commit 3c45176

File tree

1 file changed

+9
-5
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+9
-5
lines changed

compiler/rustc_ast_lowering/src/expr.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
17291729
self.expr(span, hir::ExprKind::DropTemps(expr))
17301730
}
17311731

1732-
fn expr_match(
1732+
pub(super) fn expr_match(
17331733
&mut self,
17341734
span: Span,
17351735
arg: &'hir hir::Expr<'hir>,
@@ -1794,7 +1794,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
17941794
)
17951795
}
17961796

1797-
fn expr_call_mut(
1797+
pub(super) fn expr_call_mut(
17981798
&mut self,
17991799
span: Span,
18001800
e: &'hir hir::Expr<'hir>,
@@ -1803,7 +1803,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
18031803
self.expr(span, hir::ExprKind::Call(e, args))
18041804
}
18051805

1806-
fn expr_call(
1806+
pub(super) fn expr_call(
18071807
&mut self,
18081808
span: Span,
18091809
e: &'hir hir::Expr<'hir>,
@@ -1942,7 +1942,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
19421942
hir::Expr { hir_id, kind, span: self.lower_span(span) }
19431943
}
19441944

1945-
fn expr_field(
1945+
pub(super) fn expr_field(
19461946
&mut self,
19471947
ident: Ident,
19481948
expr: &'hir hir::Expr<'hir>,
@@ -1957,7 +1957,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
19571957
}
19581958
}
19591959

1960-
fn arm(&mut self, pat: &'hir hir::Pat<'hir>, expr: &'hir hir::Expr<'hir>) -> hir::Arm<'hir> {
1960+
pub(super) fn arm(
1961+
&mut self,
1962+
pat: &'hir hir::Pat<'hir>,
1963+
expr: &'hir hir::Expr<'hir>,
1964+
) -> hir::Arm<'hir> {
19611965
hir::Arm {
19621966
hir_id: self.next_id(),
19631967
pat,

0 commit comments

Comments
 (0)