From 690caf8ab835089109b6b19eab48158d6f76915e Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Sat, 2 Mar 2013 13:31:21 -0800 Subject: [PATCH] libsyntax: deny deprecated_self in libsyntax --- src/libsyntax/codemap.rs | 10 +++++++--- src/libsyntax/fold.rs | 4 ++-- src/libsyntax/syntax.rc | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 65711d9894a..77fe53f5b25 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -295,12 +295,16 @@ pub impl CodeMap { } /// Add a new FileMap to the CodeMap and return it - fn new_filemap(+filename: FileName, src: @~str) -> @FileMap { + fn new_filemap(&self, +filename: FileName, src: @~str) -> @FileMap { return self.new_filemap_w_substr(filename, FssNone, src); } - fn new_filemap_w_substr(+filename: FileName, +substr: FileSubstr, - src: @~str) -> @FileMap { + fn new_filemap_w_substr( + &self, + +filename: FileName, + +substr: FileSubstr, + src: @~str + ) -> @FileMap { let start_pos = if self.files.len() == 0 { 0 } else { diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index b315e543f5f..464bec505e3 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -900,8 +900,8 @@ fn new_span(@self, span: span) -> span { } pub impl ast_fold { - fn fold_attributes(attrs: ~[attribute]) -> ~[attribute] { - attrs.map(|x| fold_attribute_(*x, self)) + fn fold_attributes(&self, attrs: ~[attribute]) -> ~[attribute] { + attrs.map(|x| fold_attribute_(*x, *self)) } } diff --git a/src/libsyntax/syntax.rc b/src/libsyntax/syntax.rc index f6e358e535f..7f84d6a3010 100644 --- a/src/libsyntax/syntax.rc +++ b/src/libsyntax/syntax.rc @@ -22,7 +22,7 @@ #[allow(vecs_implicitly_copyable)]; #[allow(non_camel_case_types)]; #[allow(deprecated_mode)]; -#[allow(deprecated_self)]; +#[deny(deprecated_self)]; #[no_core];