1
Fork 0

auto merge of #5827 : nikomatsakis/rust/issue-5656-change-meaning-of-borrowed-self, r=pcwalton

See #5656 for details.

r? @pcwalton
This commit is contained in:
bors 2013-04-12 15:14:24 -07:00
commit 76f6606a8c
66 changed files with 2462 additions and 781 deletions

View file

@ -318,7 +318,11 @@ pub fn slice_shift_char<'a>(s: &'a str) -> (char, &'a str) {
/// Prepend a char to a string
pub fn unshift_char(s: &mut ~str, ch: char) {
*s = from_char(ch) + *s;
// This could be more efficient.
let mut new_str = ~"";
new_str.push_char(ch);
new_str.push_str(*s);
*s = new_str;
}
/**