]> git.lizzy.rs Git - rust.git/commit
move some parts of liveness to happen during type checking
authorNiko Matsakis <niko@alum.mit.edu>
Sun, 3 Dec 2017 18:14:36 +0000 (13:14 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 15 Dec 2017 15:27:49 +0000 (10:27 -0500)
commit47c1921b9adb7c6e783ef4ec2a5f1dbe312b3da7
treea376d0d7b9a106c239a5e467a3e0be06c7477a17
parent4a940b321534a1024078cce92fc69030bfd6c60d
move some parts of liveness to happen during type checking

This allows us to re-use the `normalize` method on `TypeCheck`, which
is important since normalization may create fresh region
variables. This is not an ideal solution, though, since the current
representation of "liveness constraints" (a vector of (region, point)
pairs) is rather inefficient. Could do somewhat better by converting
to indices, but it'd still be less good than the older code. Unclear
how important this is.
src/librustc_mir/borrow_check/nll/constraint_generation.rs
src/librustc_mir/borrow_check/nll/mod.rs
src/librustc_mir/borrow_check/nll/region_infer/mod.rs
src/librustc_mir/borrow_check/nll/type_check/liveness.rs [new file with mode: 0644]
src/librustc_mir/borrow_check/nll/type_check/mod.rs
src/test/ui/nll/ty-outlives/projection-fn.rs [new file with mode: 0644]
src/test/ui/nll/ty-outlives/projection-fn.stderr [new file with mode: 0644]