]> git.lizzy.rs Git - rust.git/commit
Auto merge of #45853 - nikomatsakis:chalk-simplify-hr-lub-glb, r=arielb1
authorbors <bors@rust-lang.org>
Fri, 17 Nov 2017 22:16:11 +0000 (22:16 +0000)
committerbors <bors@rust-lang.org>
Fri, 17 Nov 2017 22:16:11 +0000 (22:16 +0000)
commit18d8acf41d21c19eedcb732d161ae943c438fd57
treed0ea741999f6186f0926448d7a6812a58c8cd38c
parentaabfed5e0c84211005c1cb2ecec2206a574a5146
parent9877fa048d66e7181a87de889768a67ea5ea3cd4
Auto merge of #45853 - nikomatsakis:chalk-simplify-hr-lub-glb, r=arielb1

Simplify higher-ranked LUB/GLB

This is a better version of https://github.com/rust-lang/rust/pull/44211. It still makes higher-ranked LUB/GLB into a hard equality test, however, it does try to identify that something changed and issue a notice to the user. I wroteup https://github.com/rust-lang/rust/issues/45852 as a tracking issue for this change.

Currently, this moves straight to a hard-error, on the basis that the crater run in #44211 saw no impact. It might be good to retest -- or perhaps to try for a warning period. Trying to do the latter in a precise way would be somewhat painful, but an imprecise way might suffice -- that is, we could issue warning *whenever* a LUB/GLB operation succeeds that will later fail, even if it doesn't ultimately impact the type check. I could experiment with this.

~~I am *mildly* wary about landing this independently of other code that moves to a universe-based system. In particular, I was nervous that this change would make coherence accepts new pairs of impls that will later be errors. I have the code for the universe-based approach available, I hope to open an PR and run some tests on its impact very shortly.~~ @arielb1 points out that I was being silly.

r? @arielb1