]> git.lizzy.rs Git - rust.git/commit
add a higher-ranked match routine
authorNiko Matsakis <niko@alum.mit.edu>
Sat, 21 May 2016 12:16:07 +0000 (08:16 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 31 May 2016 23:44:05 +0000 (19:44 -0400)
commit5cff88f2a0646297e76539fd90a084d6926fdf7d
treef7bdd28609a873f70925b5dba7d761dd1e913d85
parentb40529c5a9201efccead746e4c01f22dcbb89c8c
add a higher-ranked match routine

Currently, when projecting out of a higher-ranked where-clause, we
instantiate all higher-ranked regions with lifetime variables. This is
unnecessary since the language rules ought to guarantee (modulo #32330)
that each of those higher-ranked regions is equated with some regions
from the input types. This routine figures out what those regions are
and just uses them. Also, since #32330 is not fully fixed, it detects
when we may have unconstrained variables and indicates that in its
return value.
src/librustc/infer/higher_ranked/mod.rs
src/librustc/infer/mod.rs