diff options
| author | bors <bors@rust-lang.org> | 2016-01-16 16:03:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-01-16 16:03:22 +0000 |
| commit | c14b615534ebcd5667f594c86d18eebff6afc7cb (patch) | |
| tree | 461d05b42c7c14159cc6e50659fe46a05c298a60 /src/libstd/io/impls.rs | |
| parent | dda25f2221cc7dd68ed28254665dc7d25e2648ed (diff) | |
| parent | 4fbb71fda1a0e723a34e355037d3491bbb14dd2f (diff) | |
| download | rust-c14b615534ebcd5667f594c86d18eebff6afc7cb.tar.gz rust-c14b615534ebcd5667f594c86d18eebff6afc7cb.zip | |
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 :)
Diffstat (limited to 'src/libstd/io/impls.rs')
0 files changed, 0 insertions, 0 deletions
