Rename ExplicitSelfCategory's variants and stop re-exporting them.

This commit is contained in:
Ms2ger 2015-12-28 12:52:43 +01:00
parent 0e9f6ecd0e
commit b2c370370e
12 changed files with 59 additions and 60 deletions

View file

@ -919,13 +919,13 @@ impl fmt::Display for ty::InferTy {
impl fmt::Display for ty::ExplicitSelfCategory {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(match *self {
ty::StaticExplicitSelfCategory => "static",
ty::ByValueExplicitSelfCategory => "self",
ty::ByReferenceExplicitSelfCategory(_, hir::MutMutable) => {
ty::ExplicitSelfCategory::Static => "static",
ty::ExplicitSelfCategory::ByValue => "self",
ty::ExplicitSelfCategory::ByReference(_, hir::MutMutable) => {
"&mut self"
}
ty::ByReferenceExplicitSelfCategory(_, hir::MutImmutable) => "&self",
ty::ByBoxExplicitSelfCategory => "Box<self>",
ty::ExplicitSelfCategory::ByReference(_, hir::MutImmutable) => "&self",
ty::ExplicitSelfCategory::ByBox => "Box<self>",
})
}
}