rust/src/librustc_mir
bors c14b615534 Auto merge of #30533 - nikomatsakis:fulfillment-tree, r=aturon
This PR introduces an `ObligationForest` data structure that the fulfillment context can use to track what's going on, instead of the current flat vector. This enables a number of improvements:

1. transactional support, at least for pushing new obligations
2. remove the "errors will be reported" hack -- instead, we only add types to the global cache once their entire subtree has been proven safe. Before, we never knew when this point was reached because we didn't track the subtree.
   - this in turn allows us to limit coinductive reasoning to structural traits, which sidesteps #29859
3. keeping the backtrace should allow for an improved error message, where we give the user full context
    - we can also remove chained obligation causes

This PR is not 100% complete. In particular:

- [x] Currently, types that embed themselves like `struct Foo { f: Foo }` give an overflow when evaluating whether `Foo: Sized`. This is not a very user-friendly error message, and this is a common beginner error. I plan to special-case this scenario, I think.
- [x] I should do some perf. measurements. (Update: 2% regression.)
- [x] More tests targeting #29859
- [ ] The transactional support is not fully integrated, though that should be easy enough.
- [ ] The error messages are not taking advantage of the backtrace.

I'd certainly like to do 1 through 3 before landing, but 4 and 5 could come as separate PRs.

r? @aturon // good way to learn more about this part of the trait system
f? @arielb1 // already knows this part of the trait system :)
2016-01-16 16:03:22 +00:00
..
build Auto merge of #30635 - nagisa:mir-rid-unit-temp, r=nikomatsakis 2016-01-12 05:20:23 +00:00
hair Auto merge of #30446 - michaelwu:associated-const-type-params-pt1, r=nikomatsakis 2016-01-15 21:33:58 +00:00
transform Change destination accessor to return references 2016-01-08 14:40:32 +02:00
graphviz.rs Remove diverge terminator 2016-01-06 13:57:51 +02:00
lib.rs Add a human-readable textual form for MIR. 2016-01-04 16:11:32 -06:00
mir_map.rs fallout from removing the errors_will_be_reported flag 2016-01-16 05:22:32 -05:00
pretty.rs Fix MIR text output for terminators since they were made optional. 2016-01-07 15:16:07 -06:00