libsyntax: deny deprecated_self in libsyntax

This commit is contained in:
Erick Tryzelaar 2013-03-02 13:31:21 -08:00
parent b9d9157883
commit 690caf8ab8
3 changed files with 10 additions and 6 deletions

View File

@ -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 {

View File

@ -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))
}
}

View File

@ -22,7 +22,7 @@
#[allow(vecs_implicitly_copyable)];
#[allow(non_camel_case_types)];
#[allow(deprecated_mode)];
#[allow(deprecated_self)];
#[deny(deprecated_self)];
#[no_core];