Hide outermost_fn_param_pat, it's an internal detail
This commit is contained in:
parent
f0fe0a6eba
commit
89eac50a87
@ -105,7 +105,7 @@ pub(super) fn check_fn<'a, 'tcx>(
|
||||
|
||||
let outer_def_id = tcx.closure_base_def_id(hir.local_def_id(fn_id).to_def_id()).expect_local();
|
||||
let outer_hir_id = hir.local_def_id_to_hir_id(outer_def_id);
|
||||
GatherLocalsVisitor::new(&fcx, outer_hir_id, false).visit_body(body);
|
||||
GatherLocalsVisitor::new(&fcx, outer_hir_id).visit_body(body);
|
||||
|
||||
// C-variadic fns also have a `VaList` input that's not listed in `fn_sig`
|
||||
// (as it's created inside the body itself, not passed in from outside).
|
||||
|
@ -18,12 +18,8 @@ pub(super) struct GatherLocalsVisitor<'a, 'tcx> {
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> GatherLocalsVisitor<'a, 'tcx> {
|
||||
pub(super) fn new(
|
||||
fcx: &'a FnCtxt<'a, 'tcx>,
|
||||
parent_id: hir::HirId,
|
||||
outermost_fn_param_pat: bool,
|
||||
) -> Self {
|
||||
Self { fcx, parent_id, outermost_fn_param_pat }
|
||||
pub(super) fn new(fcx: &'a FnCtxt<'a, 'tcx>, parent_id: hir::HirId) -> Self {
|
||||
Self { fcx, parent_id, outermost_fn_param_pat: false }
|
||||
}
|
||||
|
||||
fn assign(&mut self, span: Span, nid: hir::HirId, ty_opt: Option<LocalTy<'tcx>>) -> Ty<'tcx> {
|
||||
|
@ -553,7 +553,7 @@ fn typeck_with_fallback<'tcx>(
|
||||
};
|
||||
|
||||
// Gather locals in statics (because of block expressions).
|
||||
GatherLocalsVisitor::new(&fcx, id, false).visit_body(body);
|
||||
GatherLocalsVisitor::new(&fcx, id).visit_body(body);
|
||||
|
||||
fcx.check_expr_coercable_to_type(&body.value, revealed_ty, None);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user