about summary refs log tree commit diff
path: root/src/libstd/ascii.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-02-13 04:31:19 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-13 13:05:48 -0800
commit76c313ceb15228a8683ca1dd03ce277ed0b69d4c (patch)
tree2b51b38d1de8c7de497050b7111ad938c16db439 /src/libstd/ascii.rs
parent60bc76fb78d226078a901efd94f61463c0d93b9a (diff)
downloadrust-76c313ceb15228a8683ca1dd03ce277ed0b69d4c.tar.gz
rust-76c313ceb15228a8683ca1dd03ce277ed0b69d4c.zip
Lift $dst outside the closure in write!
If you were writing to something along the lines of `self.foo` then with the new
closure rules it meant that you were borrowing `self` for the entirety of the
closure, meaning that you couldn't format other fields of `self` at the same
time as writing to a buffer contained in `self`.

By lifting the borrow outside of the closure the borrow checker can better
understand that you're only borrowing one of the fields at a time. This had to
use type ascription as well in order to preserve trait object coercions.
Diffstat (limited to 'src/libstd/ascii.rs')
0 files changed, 0 insertions, 0 deletions