about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-07-26 08:51:57 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-07-30 14:49:28 -0700
commit5d32d03b892d67f2cc0574966b50b3eab4b8bd94 (patch)
tree60317b676fef08e531fb6e6af243222e6192f571 /src/libsyntax
parent6ef13e76e95ea67103a2bc4f4becc91dc290aafc (diff)
Fix #2979: inference for lifetimes of & expressions
What we now do is to create a region variable for each &
expression (and also each borrow).  The lifetime of this
variable will be checked by borrowck to ensure it is not greater
than the lifetime of the underlying data.  This both leads to
shorter lifetimes in some cases but also longer in others,
such as taking the address to the interior of unique boxes
tht are rooted in region pointers (e.g., returning a pointer
to the interior of a sendable map).

This may lead to issue #2977 if the rvalue is not POD, because
we may drop the data in trans sooner than borrowck expects us
to.  Need to work out precisely where that fix ought to occur.
Diffstat (limited to 'src/libsyntax')
0 files changed, 0 insertions, 0 deletions