Skip to content

Commit 89eac50

Browse files
committed
Hide outermost_fn_param_pat, it's an internal detail
1 parent f0fe0a6 commit 89eac50

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

compiler/rustc_typeck/src/check/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub(super) fn check_fn<'a, 'tcx>(
105105

106106
let outer_def_id = tcx.closure_base_def_id(hir.local_def_id(fn_id).to_def_id()).expect_local();
107107
let outer_hir_id = hir.local_def_id_to_hir_id(outer_def_id);
108-
GatherLocalsVisitor::new(&fcx, outer_hir_id, false).visit_body(body);
108+
GatherLocalsVisitor::new(&fcx, outer_hir_id).visit_body(body);
109109

110110
// C-variadic fns also have a `VaList` input that's not listed in `fn_sig`
111111
// (as it's created inside the body itself, not passed in from outside).

compiler/rustc_typeck/src/check/gather_locals.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,8 @@ pub(super) struct GatherLocalsVisitor<'a, 'tcx> {
1818
}
1919

2020
impl<'a, 'tcx> GatherLocalsVisitor<'a, 'tcx> {
21-
pub(super) fn new(
22-
fcx: &'a FnCtxt<'a, 'tcx>,
23-
parent_id: hir::HirId,
24-
outermost_fn_param_pat: bool,
25-
) -> Self {
26-
Self { fcx, parent_id, outermost_fn_param_pat }
21+
pub(super) fn new(fcx: &'a FnCtxt<'a, 'tcx>, parent_id: hir::HirId) -> Self {
22+
Self { fcx, parent_id, outermost_fn_param_pat: false }
2723
}
2824

2925
fn assign(&mut self, span: Span, nid: hir::HirId, ty_opt: Option<LocalTy<'tcx>>) -> Ty<'tcx> {

compiler/rustc_typeck/src/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ fn typeck_with_fallback<'tcx>(
553553
};
554554

555555
// Gather locals in statics (because of block expressions).
556-
GatherLocalsVisitor::new(&fcx, id, false).visit_body(body);
556+
GatherLocalsVisitor::new(&fcx, id).visit_body(body);
557557

558558
fcx.check_expr_coercable_to_type(&body.value, revealed_ty, None);
559559

0 commit comments

Comments
 (0)