about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorKiet Tran <ktt3ja@gmail.com>2014-01-22 00:33:37 -0500
committerKiet Tran <ktt3ja@gmail.com>2014-01-23 14:44:28 -0500
commitb3290d322e32a1110fd31e9a9ecd246252c1c67c (patch)
tree1496c722764433c99773d6ab575ade8cd90dc250 /src/rustllvm/PassWrapper.cpp
parent43cffe9d719170bd342b10d1bb81911f0e14a7c4 (diff)
downloadrust-b3290d322e32a1110fd31e9a9ecd246252c1c67c.tar.gz
rust-b3290d322e32a1110fd31e9a9ecd246252c1c67c.zip
Make some borrow checker errors more user friendly
A mutable and immutable borrow place some restrictions on what you can
with the variable until the borrow ends. This commit attempts to convey
to the user what those restrictions are. Also, if the original borrow is
a mutable borrow, the error message has been changed (more specifically,
i. "cannot borrow `x` as immutable because it is also borrowed as
mutable" and ii. "cannot borrow `x` as mutable more than once" have
been changed to "cannot borrow `x` because it is already borrowed as
mutable").

In addition, this adds a (custom) span note to communicate where the
original borrow ends.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions