about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-18 18:46:33 -0700
committerbors <bors@rust-lang.org>2014-04-18 18:46:33 -0700
commitaf24045ff0e17764524a9eaf243479a3260c2d8b (patch)
treebc160d119b2d963afa53e9bbb59aacee6bdc4ecd /src/libsyntax/parse/parser.rs
parent9b7cfd3c724bbad9dd8a0115bb2619f307b73f8c (diff)
parent919889a1d688a6bbe2edac8705f048f06b1b455c (diff)
downloadrust-af24045ff0e17764524a9eaf243479a3260c2d8b.tar.gz
rust-af24045ff0e17764524a9eaf243479a3260c2d8b.zip
auto merge of #13607 : brson/rust/to_owned, r=brson
Continues https://github.com/mozilla/rust/pull/13548
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 379403e5409..58634be1995 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -384,7 +384,7 @@ impl<'a> Parser<'a> {
         fn tokens_to_str(tokens: &[token::Token]) -> ~str {
             let mut i = tokens.iter();
             // This might be a sign we need a connect method on Iterator.
-            let b = i.next().map_or(~"", |t| Parser::token_to_str(t));
+            let b = i.next().map_or("".to_owned(), |t| Parser::token_to_str(t));
             i.fold(b, |b,a| b + "`, `" + Parser::token_to_str(a))
         }
         if edible.contains(&self.token) {