rust/src/librustc_borrowck
Niko Matsakis 4b6b544d65 isolate dep-graph tasks
A task function is now given as a `fn` pointer to ensure that it carries
no state. Each fn can take two arguments, because that worked out to be
convenient -- these two arguments must be of some type that is
`DepGraphSafe`, a new trait that is intended to prevent "leaking"
information into the task that was derived from tracked state.

This intentionally leaves `DepGraph::in_task()`, the more common form,
alone. Eventually all uses of `DepGraph::in_task()` should be ported
to `with_task()`, but I wanted to start with a smaller subset.

Originally I wanted to use closures bound by an auto trait, but that
approach has some limitations:

- the trait cannot have a `read()` method; since the current method
  is unused, that may not be a problem.
- more importantly, we would want the auto trait to be "undefined" for all types
  *by default* -- that is, this use case doesn't really fit the typical
  auto trait scenario. For example, imagine that there is a `u32` loaded
  out of a `hir::Node` -- we don't really want to be passing that
  `u32` into the task!
2017-03-10 08:15:13 -08:00
..
borrowck isolate dep-graph tasks 2017-03-10 08:15:13 -08:00
Cargo.toml
diagnostics.rs kill the code path for E0388 2017-02-28 08:43:47 -05:00
graphviz.rs
lib.rs Remove not(stage0) from deny(warnings) 2016-12-29 21:07:20 -08:00