diff options
| author | Richo Healey <richo@psych0tik.net> | 2014-05-25 03:10:11 -0700 |
|---|---|---|
| committer | Richo Healey <richo@psych0tik.net> | 2014-05-27 11:11:15 -0700 |
| commit | 4348e23b269739657d934b532ad061bfd6d92309 (patch) | |
| tree | 4dece24751feb7145444c52fd05a1c5f7ca2de9d /src/libsyntax/ext | |
| parent | c7fe4ffe3d8315dfe98bee6d040b5a0381daab91 (diff) | |
| download | rust-4348e23b269739657d934b532ad061bfd6d92309.tar.gz rust-4348e23b269739657d934b532ad061bfd6d92309.zip | |
std: Remove String's to_owned
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/asm.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/encodable.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 26 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/libsyntax/ext/asm.rs b/src/libsyntax/ext/asm.rs index 822084df2f6..06916d5ac09 100644 --- a/src/libsyntax/ext/asm.rs +++ b/src/libsyntax/ext/asm.rs @@ -57,7 +57,7 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) let mut asm_str_style = None; let mut outputs = Vec::new(); let mut inputs = Vec::new(); - let mut cons = "".to_owned(); + let mut cons = "".to_string(); let mut volatile = false; let mut alignstack = false; let mut dialect = ast::AsmAtt; diff --git a/src/libsyntax/ext/deriving/encodable.rs b/src/libsyntax/ext/deriving/encodable.rs index b8a3eea0014..d6b7e84b535 100644 --- a/src/libsyntax/ext/deriving/encodable.rs +++ b/src/libsyntax/ext/deriving/encodable.rs @@ -36,7 +36,7 @@ impl<D:Decoder> Decodable for node_id { fn decode(d: &D) -> Node { d.read_struct("Node", 1, || { Node { - id: d.read_field("x".to_owned(), 0, || decode(d)) + id: d.read_field("x".to_string(), 0, || decode(d)) } }) } @@ -73,8 +73,8 @@ would yield functions like: fn decode(d: &D) -> spanned<T> { d.read_rec(|| { { - node: d.read_field("node".to_owned(), 0, || decode(d)), - span: d.read_field("span".to_owned(), 1, || decode(d)), + node: d.read_field("node".to_string(), 0, || decode(d)), + span: d.read_field("span".to_string(), 1, || decode(d)), } }) } diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 5f330631819..ce8ada7071b 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -430,11 +430,11 @@ fn mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> @ast::Expr { LIT_INT(i, ity) => { let s_ity = match ity { - ast::TyI => "TyI".to_owned(), - ast::TyI8 => "TyI8".to_owned(), - ast::TyI16 => "TyI16".to_owned(), - ast::TyI32 => "TyI32".to_owned(), - ast::TyI64 => "TyI64".to_owned() + ast::TyI => "TyI".to_string(), + ast::TyI8 => "TyI8".to_string(), + ast::TyI16 => "TyI16".to_string(), + ast::TyI32 => "TyI32".to_string(), + ast::TyI64 => "TyI64".to_string() }; let e_ity = cx.expr_ident(sp, id_ext(s_ity.as_slice())); @@ -447,11 +447,11 @@ fn mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> @ast::Expr { LIT_UINT(u, uty) => { let s_uty = match uty { - ast::TyU => "TyU".to_owned(), - ast::TyU8 => "TyU8".to_owned(), - ast::TyU16 => "TyU16".to_owned(), - ast::TyU32 => "TyU32".to_owned(), - ast::TyU64 => "TyU64".to_owned() + ast::TyU => "TyU".to_string(), + ast::TyU8 => "TyU8".to_string(), + ast::TyU16 => "TyU16".to_string(), + ast::TyU32 => "TyU32".to_string(), + ast::TyU64 => "TyU64".to_string() }; let e_uty = cx.expr_ident(sp, id_ext(s_uty.as_slice())); @@ -472,9 +472,9 @@ fn mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> @ast::Expr { LIT_FLOAT(fident, fty) => { let s_fty = match fty { - ast::TyF32 => "TyF32".to_owned(), - ast::TyF64 => "TyF64".to_owned(), - ast::TyF128 => "TyF128".to_owned() + ast::TyF32 => "TyF32".to_string(), + ast::TyF64 => "TyF64".to_string(), + ast::TyF128 => "TyF128".to_string() }; let e_fty = cx.expr_ident(sp, id_ext(s_fty.as_slice())); |
