]> git.lizzy.rs Git - rust.git/commit
impose inputs/ouputs on MIR after the fact
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 6 Dec 2017 09:30:58 +0000 (04:30 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 15 Dec 2017 15:27:53 +0000 (10:27 -0500)
commite9824c50edd067fefb2e4fd6f6d1a4fe739a145b
treed2c89fabab1fd292817f6c92588729de80782c53
parent3fcb13ae458ce6e2eedd34461b4e43c7be31b6b1
impose inputs/ouputs on MIR after the fact

The input/output types found in `UniversalRegions` are not normalized.
The old code used to assign them directly into the MIR, which would
lead to errors when there was a projection in a argument or return
type. This also led to some special cases in the `renumber` code.

We now renumber uniformly but then pass the input/output types into
the MIR type-checker, which equates them with the types found in MIR.
This allows us to normalize at the same time.
src/librustc_mir/borrow_check/nll/mod.rs
src/librustc_mir/borrow_check/nll/renumber.rs
src/librustc_mir/borrow_check/nll/type_check/mod.rs
src/librustc_mir/borrow_check/nll/universal_regions.rs
src/test/mir-opt/nll/named-lifetimes-basic.rs
src/test/ui/nll/projection-return.rs [new file with mode: 0644]