diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-06-25 19:03:12 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-06-25 19:32:00 -0700 |
| commit | 5d3ca4b8439d043dc77c19424348fac670acc46f (patch) | |
| tree | 32ce48a428a42a09b93950a6d91f327a132b2214 /src/libsyntax/print | |
| parent | c06ee9f7a7fe1ad311c9fd0eb57e00646297cdbd (diff) | |
| parent | efd1438770ae371406327304cb6ad4501db256ae (diff) | |
| download | rust-5d3ca4b8439d043dc77c19424348fac670acc46f.tar.gz rust-5d3ca4b8439d043dc77c19424348fac670acc46f.zip | |
Merge remote-tracking branch 'mozilla/master' into incoming
Conflicts: src/librustc/middle/astencode.rs src/librustc/middle/check_const.rs
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 853e917a6f1..0a20526da44 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -458,8 +458,11 @@ pub fn print_foreign_item(s: @ps, item: @ast::foreign_item) { word(s.s, ";"); end(s); // end the outer fn box } - ast::foreign_item_const(t) => { + ast::foreign_item_static(t, m) => { head(s, "static"); + if m { + word_space(s, "mut"); + } print_ident(s, item.ident); word_space(s, ":"); print_type(s, t); @@ -477,8 +480,11 @@ pub fn print_item(s: @ps, item: @ast::item) { let ann_node = node_item(s, item); (s.ann.pre)(ann_node); match item.node { - ast::item_const(ty, expr) => { + ast::item_static(ty, m, expr) => { head(s, visibility_qualified(item.vis, "static")); + if m == ast::m_mutbl { + word_space(s, "mut"); + } print_ident(s, item.ident); word_space(s, ":"); print_type(s, ty); @@ -1737,7 +1743,7 @@ pub fn print_bounds(s: @ps, bounds: @OptVec<ast::TyParamBound>) { if !bounds.is_empty() { word(s.s, ":"); let mut first = true; - for bounds.each |bound| { + for bounds.iter().advance |bound| { nbsp(s); if first { first = false; |
