Skip to content

[incremental] skip type-checking #45208

Open
@nikomatsakis

Description

@nikomatsakis

This is a kind of meta-bug aimed at skipping type-checking, which is (to some extent) the "holy grail" of incremental compilation. This bug only contains a list of issues and a task breakdown. For background on the general approach we have in mind, see this gist.

Substeps:

Ultimately, all of the the uses of typeck_tables_of must be analyzed and eliminated. These uses are listed here in order to mine for producing more subtasks. =)

  • src/librustc_passes/consts.rs:142: self.tables = self.tcx.typeck_tables_of(item_def_id);
  • src/librustc_typeck/check_unused.rs:69: let tables = tcx.typeck_tables_of(item_def_id);
  • src/librustc_save_analysis/dump_visitor.rs:109: let tables = self.tcx.typeck_tables_of(item_def_id);
  • src/librustc_typeck/collect.rs:1155: return tcx.typeck_tables_of(def_id).node_id_to_type(hir_id);
  • src/librustc_typeck/collect.rs:1192: tcx.typeck_tables_of(owner).node_id_to_type(hir_id)
  • src/librustc_typeck/collect.rs:1244: tcx.typeck_tables_of(def_id).closure_tys()[hir_id]
  • src/librustc_privacy/lib.rs:503: replace(tables, tcx.typeck_tables_of(def_id))
  • src/librustc_const_eval/pattern.rs:606: self.tables = self.tcx.typeck_tables_of(def_id);
  • src/librustc_const_eval/eval.rs:381: tables: tcx.typeck_tables_of(def_id),
  • src/librustc_const_eval/eval.rs:770: let tables = tcx.typeck_tables_of(def_id);
  • src/librustc_borrowck/borrowck/mod.rs:100: let tables = tcx.typeck_tables_of(owner_def_id);
  • src/librustc_borrowck/borrowck/mod.rs:198: let tables = tcx.typeck_tables_of(owner_def_id);
  • src/librustc/cfg/construct.rs:57: let tables = tcx.typeck_tables_of(owner_def_id);
  • src/librustc/ty/mod.rs:2108: self.typeck_tables_of(self.hir.body_owner_def_id(body))
    • not a direct user, see calls of body_tables() below
  • src/librustc/middle/intrinsicck.rs:136: let tables = self.tcx.typeck_tables_of(owner_def_id);
  • src/librustc_typeck/check/mod.rs:734: tcx.typeck_tables_of(body_owner_def_id);
  • src/librustc_typeck/check/mod.rs:756: tcx.typeck_tables_of(def_id).generator_sigs()[hir_id].map(|s| ty::Binder(s))
  • src/librustc_typeck/check/mod.rs:764: tcx.typeck_tables_of(def_id).closure_kinds()[hir_id].0
  • src/librustc_typeck/check/mod.rs:857: return tcx.typeck_tables_of(outer_def_id);
  • src/librustc_typeck/check/mod.rs:1152: tcx.typeck_tables_of(tcx.hir.local_def_id(it.id));
  • src/librustc_typeck/check/mod.rs:1574: tcx.typeck_tables_of(tcx.hir.local_def_id(e.node_id));
  • src/librustc_mir/transform/generator.rs:712: let interior = *tcx.typeck_tables_of(def_id).generator_interiors().get(hir_id).unwrap();
  • src/librustc_mir/hair/cx/mod.rs:96: tables: tcx.typeck_tables_of(src_def_id),
  • src/tools/clippy/clippy_lints/src/consts.rs:302: tables: self.tcx.typeck_tables_of(def_id),
  • src/librustc_privacy/lib.rs:518: let orig_tables = replace(&mut self.tables, self.tcx.body_tables(body));
  • src/librustc_privacy/lib.rs:672: let orig_tables = replace(&mut self.tables, self.tcx.body_tables(body));
  • src/librustc_driver/pretty.rs:505: self.tables.set(self.tcx.body_tables(id));
  • src/librustc_const_eval/check_match.rs:53: tables: self.tcx.body_tables(b),
  • src/librustc/lint/context.rs:636: self.tables = self.tcx.body_tables(body);
  • src/librustc/lint/context.rs:696: self.tables = self.tcx.body_tables(body_id);
  • src/librustc/middle/liveness.rs:530: let tables = ir.tcx.body_tables(body);
  • src/librustc/middle/reachable.rs:101: self.tables = self.tcx.body_tables(body);
  • src/librustc/middle/dead.rs:218: self.tables = self.tcx.body_tables(body);
  • src/librustc_mir/build/mod.rs:106: let gen_ty = tcx.body_tables(body_id).node_id_to_type(fn_hir_id);
  • src/librustc_mir/build/mod.rs:247: let closure_ty = tcx.body_tables(body_id).node_id_to_type(closure_expr_hir_id);
  • src/tools/clippy/clippy_lints/src/attrs.rs:172: is_relevant_expr(tcx, tcx.body_tables(eid), &tcx.hir.body(eid).value)
  • src/tools/clippy/clippy_lints/src/attrs.rs:180: ImplItemKind::Method(_, eid) => is_relevant_expr(tcx, tcx.body_tables(eid), &tcx.hir.body(eid).value),
  • src/tools/clippy/clippy_lints/src/attrs.rs:189: is_relevant_expr(tcx, tcx.body_tables(eid), &tcx.hir.body(eid).value)
  • src/tools/clippy/clippy_lints/src/functions.rs:154: let tables = cx.tcx.body_tables(body.id());

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-enhancementCategory: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions