]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/tt/macro_parser.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / libsyntax / ext / tt / macro_parser.rs
index 62999fb496afa1347cf76422c35a75a0b24e99b0..8143f2aceeb610a6903b3c0305f3eb932079078f 100644 (file)
@@ -366,9 +366,9 @@ pub fn parse(sess: &ParseSess,
                 }
                 return Success(nameize(sess, ms, v.as_slice()));
             } else if eof_eis.len() > 1u {
-                return Error(sp, ~"ambiguity: multiple successful parses");
+                return Error(sp, "ambiguity: multiple successful parses".to_owned());
             } else {
-                return Failure(sp, ~"unexpected end of macro invocation");
+                return Failure(sp, "unexpected end of macro invocation".to_owned());
             }
         } else {
             if (bb_eis.len() > 0u && next_eis.len() > 0u)
@@ -436,7 +436,7 @@ pub fn parse_nt(p: &mut Parser, name: &str) -> Nonterminal {
         token::IDENT(sn,b) => { p.bump(); token::NtIdent(~sn,b) }
         _ => {
             let token_str = token::to_str(&p.token);
-            p.fatal(~"expected ident, found " + token_str)
+            p.fatal("expected ident, found ".to_owned() + token_str)
         }
       },
       "path" => {
@@ -450,6 +450,6 @@ pub fn parse_nt(p: &mut Parser, name: &str) -> Nonterminal {
         res
       }
       "matchers" => token::NtMatchers(p.parse_matchers()),
-      _ => p.fatal(~"unsupported builtin nonterminal parser: " + name)
+      _ => p.fatal("unsupported builtin nonterminal parser: ".to_owned() + name)
     }
 }