]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #27641 - nikomatsakis:soundness-rfc-1214, r=nrc
authorbors <bors@rust-lang.org>
Fri, 14 Aug 2015 15:26:09 +0000 (15:26 +0000)
committerbors <bors@rust-lang.org>
Fri, 14 Aug 2015 15:26:09 +0000 (15:26 +0000)
This PR implements the majority of RFC 1214. In particular, it implements:

- the new outlives relation
- comprehensive WF checking

For the most part, new code receives warnings, not errors, though 3 regressions were found via a crater run.

There are some deviations from RFC 1214. Most notably:

- we still consider implied bounds from fn ret; this intersects other soundness issues that I intend to address in detail in a follow-up RFC. Fixing this without breaking a lot of code probably requires rewriting compare-method somewhat (which is probably a good thing).
- object types do not check trait bounds for fear of encountering `Self`; this was left as an unresolved question in RFC 1214, but ultimately feels inconsistent.

Both of those two issues are highlighted in the tracking issue, https://github.com/rust-lang/rust/issues/27579. #27579 also includes a testing matrix with new tests that I wrote -- these probably duplicate some existing tests, I tried to check but wasn't quite sure what to look for. I tried to be thorough in testing the WF relation, at least, but would welcome suggestions for missing tests.

r? @nrc (or perhaps someone else?)

1  2 
src/libcore/iter.rs
src/libcore/marker.rs
src/libcore/num/mod.rs
src/librustc/lib.rs

Simple merge
Simple merge
Simple merge
Simple merge