Stop re-exporting the ast::BindingMode variants.

This commit is contained in:
Ms2ger
2015-12-18 14:23:01 +01:00
parent f963eb2870
commit 143b9d80d0
9 changed files with 26 additions and 27 deletions

View File

@@ -2467,12 +2467,12 @@ impl<'a> State<'a> {
ast::PatWild => try!(word(&mut self.s, "_")),
ast::PatIdent(binding_mode, ref path1, ref sub) => {
match binding_mode {
ast::BindByRef(mutbl) => {
ast::BindingMode::ByRef(mutbl) => {
try!(self.word_nbsp("ref"));
try!(self.print_mutability(mutbl));
}
ast::BindByValue(ast::MutImmutable) => {}
ast::BindByValue(ast::MutMutable) => {
ast::BindingMode::ByValue(ast::MutImmutable) => {}
ast::BindingMode::ByValue(ast::MutMutable) => {
try!(self.word_nbsp("mut"));
}
}
@@ -2678,7 +2678,7 @@ impl<'a> State<'a> {
let m = match *explicit_self {
ast::SelfStatic => ast::MutImmutable,
_ => match decl.inputs[0].pat.node {
ast::PatIdent(ast::BindByValue(m), _, _) => m,
ast::PatIdent(ast::BindingMode::ByValue(m), _, _) => m,
_ => ast::MutImmutable
}
};