Skip to content

Commit 9118dda

Browse files
committed
---
yaml --- r: 229325 b: refs/heads/try c: 5309fbb h: refs/heads/master i: 229323: 535b41c v: v3
1 parent 246d624 commit 9118dda

File tree

5 files changed

+4
-23
lines changed

5 files changed

+4
-23
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 47041fe28920326807b29c1246ca9712e184f885
4+
refs/heads/try: 5309fbb6c91b8667a016647484ab2ab73d8bf0dd
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/libcollections/str.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -479,19 +479,6 @@ impl str {
479479
core_str::StrExt::as_bytes(self)
480480
}
481481

482-
/// Converts `self` to a mutable byte slice.
483-
///
484-
/// # Unsafety
485-
///
486-
/// The `str` type guarantees that its contents are UTF-8 bytes, which can
487-
/// be violated using this function, leading to memory-unsafeties in other
488-
/// string functions.
489-
#[unstable(feature = "str_as_bytes_mut")]
490-
#[inline(always)]
491-
pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8] {
492-
core_str::StrExt::as_bytes_mut(self)
493-
}
494-
495482
/// Returns a raw pointer to the `&str`'s buffer.
496483
///
497484
/// The caller must ensure that the string outlives this pointer, and

branches/try/src/libcore/str/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,6 @@ pub trait StrExt {
12641264
fn char_at(&self, i: usize) -> char;
12651265
fn char_at_reverse(&self, i: usize) -> char;
12661266
fn as_bytes<'a>(&'a self) -> &'a [u8];
1267-
unsafe fn as_bytes_mut<'a>(&'a mut self) -> &'a mut [u8];
12681267
fn find<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize>;
12691268
fn rfind<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize>
12701269
where P::Searcher: ReverseSearcher<'a>;
@@ -1557,11 +1556,6 @@ impl StrExt for str {
15571556
unsafe { mem::transmute(self) }
15581557
}
15591558

1560-
#[inline]
1561-
unsafe fn as_bytes_mut(&mut self) -> &mut [u8] {
1562-
mem::transmute(self)
1563-
}
1564-
15651559
fn find<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize> {
15661560
pat.into_searcher(self).next_match().map(|(i, _)| i)
15671561
}

branches/try/src/libstd/ascii.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
use prelude::v1::*;
1616

17+
use mem;
1718
use ops::Range;
1819

1920
/// Extension methods for ASCII-subset only operations on owned strings
@@ -185,12 +186,12 @@ impl AsciiExt for str {
185186
}
186187

187188
fn make_ascii_uppercase(&mut self) {
188-
let me: &mut [u8] = unsafe { self.as_bytes_mut() };
189+
let me: &mut [u8] = unsafe { mem::transmute(self) };
189190
me.make_ascii_uppercase()
190191
}
191192

192193
fn make_ascii_lowercase(&mut self) {
193-
let me: &mut [u8] = unsafe { self.as_bytes_mut() };
194+
let me: &mut [u8] = unsafe { mem::transmute(self) };
194195
me.make_ascii_lowercase()
195196
}
196197
}

branches/try/src/libstd/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@
235235
#![feature(slice_bytes)]
236236
#![feature(slice_patterns)]
237237
#![feature(staged_api)]
238-
#![feature(str_as_bytes_mut)]
239238
#![feature(str_char)]
240239
#![feature(str_internals)]
241240
#![feature(unboxed_closures)]

0 commit comments

Comments
 (0)