diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2017-11-08 11:34:09 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2017-11-08 11:34:09 +0100 |
| commit | 702ce8f0a6d8a026343f0f162585ee4fd7ef81c1 (patch) | |
| tree | f0e9bdcc2cc19ab8cb8f97742bd397225c31bf2c | |
| parent | 13bc7ad476f8021c041d44d1adb7d81c75e28f79 (diff) | |
| download | rust-702ce8f0a6d8a026343f0f162585ee4fd7ef81c1.tar.gz rust-702ce8f0a6d8a026343f0f162585ee4fd7ef81c1.zip | |
incr.comp.: Remove outdated comment about TraitSelect dep-node.
| -rw-r--r-- | src/librustc/dep_graph/dep_node.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/librustc/dep_graph/dep_node.rs b/src/librustc/dep_graph/dep_node.rs index d05445e44dd..57e916e437f 100644 --- a/src/librustc/dep_graph/dep_node.rs +++ b/src/librustc/dep_graph/dep_node.rs @@ -539,31 +539,6 @@ define_dep_nodes!( <'tcx> [input] AllLocalTraitImpls, - // Trait selection cache is a little funny. Given a trait - // reference like `Foo: SomeTrait<Bar>`, there could be - // arbitrarily many def-ids to map on in there (e.g., `Foo`, - // `SomeTrait`, `Bar`). We could have a vector of them, but it - // requires heap-allocation, and trait sel in general can be a - // surprisingly hot path. So instead we pick two def-ids: the - // trait def-id, and the first def-id in the input types. If there - // is no def-id in the input types, then we use the trait def-id - // again. So for example: - // - // - `i32: Clone` -> `TraitSelect { trait_def_id: Clone, self_def_id: Clone }` - // - `u32: Clone` -> `TraitSelect { trait_def_id: Clone, self_def_id: Clone }` - // - `Clone: Clone` -> `TraitSelect { trait_def_id: Clone, self_def_id: Clone }` - // - `Vec<i32>: Clone` -> `TraitSelect { trait_def_id: Clone, self_def_id: Vec }` - // - `String: Clone` -> `TraitSelect { trait_def_id: Clone, self_def_id: String }` - // - `Foo: Trait<Bar>` -> `TraitSelect { trait_def_id: Trait, self_def_id: Foo }` - // - `Foo: Trait<i32>` -> `TraitSelect { trait_def_id: Trait, self_def_id: Foo }` - // - `(Foo, Bar): Trait` -> `TraitSelect { trait_def_id: Trait, self_def_id: Foo }` - // - `i32: Trait<Foo>` -> `TraitSelect { trait_def_id: Trait, self_def_id: Foo }` - // - // You can see that we map many trait refs to the same - // trait-select node. This is not a problem, it just means - // imprecision in our dep-graph tracking. The important thing is - // that for any given trait-ref, we always map to the **same** - // trait-select node. [anon] TraitSelect, [] ParamEnv(DefId), |
