rust/src/librustc_driver
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
..
driver.rs move const block checks before lowering step 2016-01-15 13:16:54 +01:00
lib.rs Auto merge of #30930 - oli-obk:fix/30887, r=arielb1 2016-01-16 08:20:31 +00:00
pretty.rs Annotate the compiler with information about what it is doing when. 2016-01-05 21:05:50 -05:00
target_features.rs Rustfmting librustc_driver. 2015-11-10 20:48:44 +00:00
test.rs only insert global predicates into the global cache once we've 2016-01-16 05:22:32 -05:00