auto merge of #11485 : eddyb/rust/sweep-old-rust, r=nikomatsakis

This commit is contained in:
bors 2014-01-14 12:32:11 -08:00
commit 9075025c7b
39 changed files with 191 additions and 262 deletions

View file

@ -377,7 +377,7 @@ pub enum SelfTy {
SelfStatic,
SelfValue,
SelfBorrowed(Option<Lifetime>, Mutability),
SelfManaged(Mutability),
SelfManaged,
SelfOwned,
}
@ -388,7 +388,7 @@ impl Clean<SelfTy> for ast::ExplicitSelf {
ast::SelfValue(_) => SelfValue,
ast::SelfUniq(_) => SelfOwned,
ast::SelfRegion(lt, mt) => SelfBorrowed(lt.clean(), mt.clean()),
ast::SelfBox(mt) => SelfManaged(mt.clean()),
ast::SelfBox => SelfManaged,
}
}
}

View file

@ -405,8 +405,7 @@ impl<'a> fmt::Default for Method<'a> {
clean::SelfStatic => {},
clean::SelfValue => args.push_str("self"),
clean::SelfOwned => args.push_str("~self"),
clean::SelfManaged(clean::Mutable) => args.push_str("@mut self"),
clean::SelfManaged(clean::Immutable) => args.push_str("@self"),
clean::SelfManaged => args.push_str("@self"),
clean::SelfBorrowed(Some(ref lt), clean::Immutable) => {
args.push_str(format!("&amp;{} self", *lt));
}