diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-05 18:38:51 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-05 18:38:51 -0800 |
| commit | bb5e16b4b869f0c585c21db110e51165865e8833 (patch) | |
| tree | 5ad6a32f888d7036f31f88928f982986467a55bb /src/libsyntax/print/pprust.rs | |
| parent | 0ca3a8cca718d6715a73fd0931cda3135d68ebd1 (diff) | |
| parent | bf6c007760169e9c382d3700fd1cdd20037e4343 (diff) | |
| download | rust-bb5e16b4b869f0c585c21db110e51165865e8833.tar.gz rust-bb5e16b4b869f0c585c21db110e51165865e8833.zip | |
rollup merge of #20554: huonw/mut-pattern
Conflicts: src/librustc_typeck/check/_match.rs
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index effd6e8218d..553e717f692 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2082,8 +2082,11 @@ impl<'a> State<'a> { try!(word(&mut self.s, "box ")); try!(self.print_pat(&**inner)); } - ast::PatRegion(ref inner) => { + ast::PatRegion(ref inner, mutbl) => { try!(word(&mut self.s, "&")); + if mutbl == ast::MutMutable { + try!(word(&mut self.s, "mut ")); + } try!(self.print_pat(&**inner)); } ast::PatLit(ref e) => try!(self.print_expr(&**e)), |
