rust/src/test/incremental
bors 35e8924dc5 Auto merge of #37660 - nikomatsakis:incremental-36349, r=eddyb
Separate impl items from the parent impl

This change separates impl item bodies out of the impl itself. This gives incremental more resolution. In so doing, it refactors how the visitors work, and cleans up a bit of the collect/check logic (mostly by moving things out of collect that didn't really belong there, because they were just checking conditions).

However, this is not as effective as I expected, for a kind of frustrating reason. In particular, when invoking `foo.bar()` you still wind up with dependencies on private items. The problem is that the method resolution code scans that list for methods with the name `bar` -- and this winds up touching *all* the methods, even private ones.

I can imagine two obvious ways to fix this:

- separating fn bodies from fn sigs (#35078, currently being pursued by @flodiebold)
- a more aggressive model of incremental that @michaelwoerister has been advocating, in which we hash the intermediate results (e.g., the outputs of collect) so that we can see that the intermediate result hasn't changed, even if a particular impl item has changed.

So all in all I'm not quite sure whether to land this or not. =) It still seems like it has to be a win in some cases, but not with the test cases we have just now. I can try to gin up some test cases, but I'm not sure if they will be totally realistic. On the other hand, some of the early refactorings to the visitor trait seem worthwhile to me regardless.

cc #36349 -- well, this is basically a fix for that issue, I guess

r? @michaelwoerister

NB: Based atop of @eddyb's PR https://github.com/rust-lang/rust/pull/37402; don't land until that lands.
2016-11-17 17:31:01 -08:00
..
callee_caller_cross_crate use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
change_crate_order map create numbers between compilations 2016-09-14 00:00:23 +03:00
change_private_fn add test case for changes to a private fn 2016-10-21 17:30:12 -04:00
change_private_fn_cc Adapt accidentally fixed test case. 2016-11-13 19:49:57 -05:00
change_private_impl_method when creating an AssociatedItem, read data from impl, not impl item 2016-11-17 13:44:21 -05:00
change_private_impl_method_cc fix change_private_impl_method_cc test 2016-11-17 13:44:22 -05:00
hashes Auto merge of #37660 - nikomatsakis:incremental-36349, r=eddyb 2016-11-17 17:31:01 -08:00
inlined_hir_34991 remap Hir(InlinedDefId) to MetaData(OriginalDefId) 2016-08-02 05:31:25 -04:00
krate_reassign_34991 watch out for krate numbers being reassigned 2016-08-02 05:31:25 -04:00
remove-private-item-cross-crate expanding a def-id is not a read 2016-09-06 11:18:10 -04:00
rlib_cross_crate use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
span_hash_stable incr.comp. Add tests for stable span hashing. 2016-09-01 09:43:44 -04:00
struct_change_field_type_cross_crate use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
type_alias_cross_crate use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
cache_file_headers.rs incr.comp.: Add test case for cache artifact file headers. 2016-09-26 17:14:31 -04:00
commandline-args.rs Fix incremental/commandline-args test. 2016-08-11 10:59:05 -04:00
crate_hash_reorder.rs fix stray comment 2016-08-23 13:29:28 -04:00
dirty_clean.rs use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
foreign.rs hash foreign items too 2016-08-01 19:57:32 -04:00
hello_world.rs use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
ich_method_call_trait_scope.rs incorporate resolve results into hashing 2016-08-09 20:28:46 -04:00
ich_nested_items.rs stop hashing nested items, and add a test 2016-08-09 20:28:45 -04:00
ich_resolve_results.rs incorporate resolve results into hashing 2016-08-09 20:28:46 -04:00
issue-35593.rs add regression test for #35593 2016-08-23 07:40:53 -04:00
krate-inherent.rs write to inherent_impls during the visitor 2016-09-06 11:17:03 -04:00
krate-inlined.rs allow testing DepNode::Krate edges directly 2016-09-06 11:18:09 -04:00
source_loc_macros.rs incr.comp. Add tests for stable span hashing. 2016-09-01 09:43:44 -04:00
spans_insignificant_w_o_debuginfo.rs incr.comp. Add tests for stable span hashing. 2016-09-01 09:43:44 -04:00
spans_significant_w_debuginfo.rs incr.comp. Add tests for stable span hashing. 2016-09-01 09:43:44 -04:00
spike-neg1.rs Address mw nits 2016-07-28 12:05:45 -04:00
spike-neg2.rs Address mw nits 2016-07-28 12:05:45 -04:00
spike.rs use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
string_constant.rs compute and cache HIR hashes at beginning 2016-08-20 07:26:14 -04:00
struct_add_field.rs use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
struct_change_field_name.rs Improve error message and snippet for "did you mean `x`" 2016-10-02 15:57:39 +11:00
struct_change_field_type.rs use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
struct_change_nothing.rs use preds to serialize just what we need 2016-08-09 08:26:06 -04:00
struct_remove_field.rs use preds to serialize just what we need 2016-08-09 08:26:06 -04:00