diff options
| author | Aaron Turon <aturon@mozilla.com> | 2016-03-13 22:55:26 -0700 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2016-03-14 15:05:16 -0700 |
| commit | 6562eeb05396be4ee4d4f413ac3e0f9f1afcc536 (patch) | |
| tree | e6e9b2d36fbc5b5db3806aa867391f171a5010c6 /src/libsyntax | |
| parent | dc45d924b6ec0ffc7fadf8763ce5fc91946e2dcd (diff) | |
| download | rust-6562eeb05396be4ee4d4f413ac3e0f9f1afcc536.tar.gz rust-6562eeb05396be4ee4d4f413ac3e0f9f1afcc536.zip | |
Add pretty printer output for `default`
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 2cfed1f82f7..533487ae1c5 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1582,6 +1582,9 @@ impl<'a> State<'a> { try!(self.hardbreak_if_not_bol()); try!(self.maybe_print_comment(ii.span.lo)); try!(self.print_outer_attributes(&ii.attrs)); + if let ast::Defaultness::Default = ii.defaultness { + try!(self.word_nbsp("default")); + } match ii.node { ast::ImplItemKind::Const(ref ty, ref expr) => { try!(self.print_associated_const(ii.ident, &ty, Some(&expr), ii.vis)); |
