From 930885d5e5f817e3d7609f93d5ba89b1abebfaf4 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 9 Aug 2013 01:25:24 -0700 Subject: Forbid pub/priv where it has no effect Closes #5495 --- src/libsyntax/ext/deriving/generic.rs | 2 +- src/libsyntax/ext/quote.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs index a1abe47e090..6b028e25c0f 100644 --- a/src/libsyntax/ext/deriving/generic.rs +++ b/src/libsyntax/ext/deriving/generic.rs @@ -542,7 +542,7 @@ impl<'self> MethodDef<'self> { id: cx.next_id(), span: span, self_id: cx.next_id(), - vis: ast::public + vis: ast::inherited, } } diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index d218be5e476..9d82bb9c4f8 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -40,11 +40,11 @@ pub mod rt { pub use codemap::{BytePos, span, dummy_spanned}; pub trait ToTokens { - pub fn to_tokens(&self, _cx: @ExtCtxt) -> ~[token_tree]; + fn to_tokens(&self, _cx: @ExtCtxt) -> ~[token_tree]; } impl ToTokens for ~[token_tree] { - pub fn to_tokens(&self, _cx: @ExtCtxt) -> ~[token_tree] { + fn to_tokens(&self, _cx: @ExtCtxt) -> ~[token_tree] { (*self).clone() } } @@ -65,7 +65,7 @@ pub mod rt { pub trait ToSource { // Takes a thing and generates a string containing rust code for it. - pub fn to_source(&self) -> @str; + fn to_source(&self) -> @str; } impl ToSource for ast::ident { -- cgit 1.4.1-3-g733a5