]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #53873 - nikomatsakis:nll-universe-subtyping-and-pattern-ascription...
authorbors <bors@rust-lang.org>
Tue, 11 Sep 2018 20:59:11 +0000 (20:59 +0000)
committerbors <bors@rust-lang.org>
Tue, 11 Sep 2018 20:59:11 +0000 (20:59 +0000)
support ascription for patterns in NLL

This implements the strategy outlined in [this comment](https://github.com/rust-lang/rust/issues/47184#issuecomment-416669986):

- We first extend the NLL subtyping code so it can handle inference variables and subtyping.
- Then we extend HAIR patterns with type ascription.
- Then we treat the type `T` in `let pat: T = ...` as an ascription.

Before landing, a few things:

- [x] Fix the WF rule bug (filed a FIXME https://github.com/rust-lang/rust/issues/54105)
- [x] Fix an ICE I encountered locally around bound regions, or else file a follow-up
- [x] More tests probably =)

r? @pnkfelix


Trivial merge