diff options
| author | bors <bors@rust-lang.org> | 2014-11-18 03:26:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-18 03:26:36 +0000 |
| commit | f637f1c5a27b2d8023342163c6ac5c394d91c1fe (patch) | |
| tree | 4333f8b4ea88527bd710be5f8a8b8ea584338ee6 /src/libsyntax/ext | |
| parent | 9c96a79a74f10bed18b031ce0ac4126c56d6cfb3 (diff) | |
| parent | d50e80f449b068bc5a239fc6680162ff852cdbfd (diff) | |
| download | rust-f637f1c5a27b2d8023342163c6ac5c394d91c1fe.tar.gz rust-f637f1c5a27b2d8023342163c6ac5c394d91c1fe.zip | |
auto merge of #19050 : japaric/rust/moar-dst, r=aturon
r? @aturon cc #16918
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index b3086fba834..ec691757077 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -90,14 +90,14 @@ pub mod rt { */ // FIXME: Move this trait to pprust and get rid of *_to_str? - pub trait ToSource { + pub trait ToSource for Sized? { // Takes a thing and generates a string containing rust code for it. fn to_source(&self) -> String; } // FIXME (Issue #16472): This should go away after ToToken impls // are revised to go directly to token-trees. - trait ToSourceWithHygiene : ToSource { + trait ToSourceWithHygiene for Sized? : ToSource { // Takes a thing and generates a string containing rust code // for it, encoding Idents as special byte sequences to // maintain hygiene across serialization and deserialization. @@ -150,15 +150,15 @@ pub mod rt { macro_rules! impl_to_source_slice( ($t:ty, $sep:expr) => ( - impl<'a> ToSource for &'a [$t] { + impl ToSource for [$t] { fn to_source(&self) -> String { - slice_to_source($sep, *self) + slice_to_source($sep, self) } } - impl<'a> ToSourceWithHygiene for &'a [$t] { + impl ToSourceWithHygiene for [$t] { fn to_source_with_hygiene(&self) -> String { - slice_to_source_with_hygiene($sep, *self) + slice_to_source_with_hygiene($sep, self) } } ) @@ -200,14 +200,14 @@ pub mod rt { } } - impl<'a> ToSource for &'a str { + impl ToSource for str { fn to_source(&self) -> String { let lit = dummy_spanned(ast::LitStr( - token::intern_and_get_ident(*self), ast::CookedStr)); + token::intern_and_get_ident(self), ast::CookedStr)); pprust::lit_to_string(&lit) } } - impl<'a> ToSourceWithHygiene for &'a str { + impl ToSourceWithHygiene for str { fn to_source_with_hygiene(&self) -> String { self.to_source() } |
