about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-07-27 07:54:15 +0000
committerbors <bors@rust-lang.org>2017-07-27 07:54:15 +0000
commitda4d49002d9294380e3df9d2bcd306ea5dd2c9c0 (patch)
treee55532ac875fab0563582604f8e168996463854c /src/rustllvm/PassWrapper.cpp
parente574ba4994c00b1e166ce4e450b7b984e1bff5d4 (diff)
parent688852047c812007280ad4abb08323bc4a5d44d3 (diff)
downloadrust-da4d49002d9294380e3df9d2bcd306ea5dd2c9c0.tar.gz
rust-da4d49002d9294380e3df9d2bcd306ea5dd2c9c0.zip
Auto merge of #43479 - ivanbakel:loop_borrow_msg, r=estebank
Extended error message for mut borrow conflicts in loops

RFC issue: https://github.com/rust-lang/rfcs/issues/2080

The error message for multiple mutable borrows on the same value over loop iterations now makes it clear that the conflict comes from the borrow outlasting the loop. The wording of the error is based on the special case of the moved-value error for a value moved in a loop. Following the example of that error, the code remains the same for the special case.

This is mainly because I felt the current message is confusing in the loop case : https://github.com/rust-lang/rust/issues/43437. It's not clear that the two conflicting borrows are in different iterations of the loop, and instead it just looks like the compiler has an issue with a single line.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions