about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-12-30 00:42:13 +0000
committerbors <bors@rust-lang.org>2014-12-30 00:42:13 +0000
commitfea5aa656ff4349f4d3e1fea1447d26986762ae1 (patch)
tree3736614e84499fcde1623619b6e1336f2b2221d6 /src/libstd/rt
parent71123902e17ad339649f33423995eac78da40e3c (diff)
parent113f8aa86b64c0be1981a69d110e42d22460b33c (diff)
downloadrust-fea5aa656ff4349f4d3e1fea1447d26986762ae1.tar.gz
rust-fea5aa656ff4349f4d3e1fea1447d26986762ae1.zip
auto merge of #20160 : nick29581/rust/ranges2, r=nikomatsakis
The first six commits are from an earlier PR (#19858) and have already been reviewed. This PR makes an awful hack in the compiler to accommodate slices both natively and in the index a range form. After a snapshot we can hopefully add the new Index impls and then we can remove these awful hacks.

r? @nikomatsakis (or anyone who knows the compiler, really)
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs
index 26dadfd9fb1..6b007056a51 100644
--- a/src/libstd/rt/util.rs
+++ b/src/libstd/rt/util.rs
@@ -139,7 +139,7 @@ fn abort_(args: &fmt::Arguments) -> ! {
     }
     impl<'a> FormatWriter for BufWriter<'a> {
         fn write(&mut self, bytes: &[u8]) -> fmt::Result {
-            let left = self.buf[mut self.pos..];
+            let left = self.buf.slice_from_mut(self.pos);
             let to_write = bytes[..cmp::min(bytes.len(), left.len())];
             slice::bytes::copy_memory(left, to_write);
             self.pos += to_write.len();