Skip to content

Commit cad6fcf

Browse files
committed
---
yaml --- r: 65019 b: refs/heads/snap-stage3 c: 39fafd6 h: refs/heads/master i: 65017: c7c36c4 65015: 6590576 v: v3
1 parent 284bf57 commit cad6fcf

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 20fad0f5fff381210bfe79b35a5fe8332ec86b34
4+
refs/heads/snap-stage3: 39fafd655a85a2af9cddf59b70a687b44570fb6f
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/str.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,25 +1079,37 @@ pub mod traits {}
10791079
pub trait Str {
10801080
/// Work with `self` as a slice.
10811081
fn as_slice<'a>(&'a self) -> &'a str;
1082+
1083+
/// Convert `self` into a ~str.
1084+
fn into_owned(self) -> ~str;
10821085
}
10831086
10841087
impl<'self> Str for &'self str {
10851088
#[inline]
10861089
fn as_slice<'a>(&'a self) -> &'a str { *self }
1090+
1091+
#[inline]
1092+
fn into_owned(self) -> ~str { self.to_owned() }
10871093
}
10881094
10891095
impl<'self> Str for ~str {
10901096
#[inline]
10911097
fn as_slice<'a>(&'a self) -> &'a str {
10921098
let s: &'a str = *self; s
10931099
}
1100+
1101+
#[inline]
1102+
fn into_owned(self) -> ~str { self }
10941103
}
10951104
10961105
impl<'self> Str for @str {
10971106
#[inline]
10981107
fn as_slice<'a>(&'a self) -> &'a str {
10991108
let s: &'a str = *self; s
11001109
}
1110+
1111+
#[inline]
1112+
fn into_owned(self) -> ~str { self.to_owned() }
11011113
}
11021114
11031115
impl<'self> Container for &'self str {

0 commit comments

Comments
 (0)