about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2013-05-23 21:37:37 -0400
committerNiko Matsakis <niko@alum.mit.edu>2013-07-01 20:43:54 -0400
commit9e6d5e152ee30c306afccfe9ede105acc6a0a278 (patch)
treefd519c4b413ea2adb645c87843fb039d1b22bf54 /src/rt/rust_kernel.cpp
parente482856d76fba8d31ee114d4fb74f8c18f63e73c (diff)
downloadrust-9e6d5e152ee30c306afccfe9ede105acc6a0a278.tar.gz
rust-9e6d5e152ee30c306afccfe9ede105acc6a0a278.zip
Defer reasoning about region relationships until after regionck.
This patch makes error handling for region inference failures more
uniform by not reporting *any* region errors until the reigon inference
step. This requires threading through more information about what
caused a region constraint, so that we can still give informative
error messages.

I have only taken partial advantage of this information: when region
inference fails, we still report the same error we always did, despite
the fact that we now know precisely what caused the various constriants
and what the region variable represents, which we did not know before.

This change is required not only to improve error messages but
because the region hierarchy is not in fact fully known until regionck,
because it is not clear where closure bodies fit in (our current
treatment is unsound). Moreover, the relationships between free variables
cannot be fully determined until type inference is otherwise complete.

cc #3238.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions