Skip to content

Commit 372b1cd

Browse files
crabtwcatamorphism
authored andcommitted
---
yaml --- r: 38639 b: refs/heads/incoming c: 66151d0 h: refs/heads/master i: 38637: 79f5287 38635: 2da5f6c 38631: e66012f 38623: 36b148d v: v3
1 parent 0a5ad94 commit 372b1cd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: ca5506a5dee75eb3ee84eff1f0fa5f5e40f54544
9+
refs/heads/incoming: 66151d02f54300bb6f4c326728d6a2d875cdc80a
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libsyntax/print/pprust.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ fn print_item(s: ps, &&item: @ast::item) {
444444
print_outer_attributes(s, item.attrs);
445445
let ann_node = node_item(s, item);
446446
s.ann.pre(ann_node);
447-
print_visibility(s, item.vis);
448447
match item.node {
449448
ast::item_const(ty, expr) => {
450449
head(s, visibility_qualified(item.vis, ~"const"));
@@ -480,18 +479,18 @@ fn print_item(s: ps, &&item: @ast::item) {
480479
ast::named => {
481480
word_nbsp(s, ~"mod");
482481
print_ident(s, item.ident);
482+
nbsp(s);
483483
}
484484
ast::anonymous => {}
485485
}
486-
nbsp(s);
487486
bopen(s);
488487
print_foreign_mod(s, nmod, item.attrs);
489488
bclose(s, item.span);
490489
}
491490
ast::item_ty(ty, params) => {
492491
ibox(s, indent_unit);
493492
ibox(s, 0u);
494-
word_nbsp(s, ~"type");
493+
word_nbsp(s, visibility_qualified(item.vis, ~"type"));
495494
print_ident(s, item.ident);
496495
print_type_params(s, params);
497496
end(s); // end the inner ibox
@@ -503,15 +502,15 @@ fn print_item(s: ps, &&item: @ast::item) {
503502
end(s); // end the outer ibox
504503
}
505504
ast::item_enum(enum_definition, params) => {
506-
print_enum_def(s, enum_definition, params, item.ident, item.span);
505+
print_enum_def(s, enum_definition, params, item.ident, item.span, item.vis);
507506
}
508507
ast::item_class(struct_def, tps) => {
509-
head(s, ~"struct");
508+
head(s, visibility_qualified(item.vis, ~"struct"));
510509
print_struct(s, struct_def, tps, item.ident, item.span);
511510
}
512511

513512
ast::item_impl(tps, opt_trait, ty, methods) => {
514-
head(s, ~"impl");
513+
head(s, visibility_qualified(item.vis, ~"impl"));
515514
if tps.is_not_empty() {
516515
print_type_params(s, tps);
517516
space(s.s);
@@ -534,7 +533,7 @@ fn print_item(s: ps, &&item: @ast::item) {
534533
bclose(s, item.span);
535534
}
536535
ast::item_trait(tps, traits, methods) => {
537-
head(s, ~"trait");
536+
head(s, visibility_qualified(item.vis, ~"trait"));
538537
print_ident(s, item.ident);
539538
print_type_params(s, tps);
540539
if vec::len(traits) != 0u {
@@ -550,6 +549,7 @@ fn print_item(s: ps, &&item: @ast::item) {
550549
bclose(s, item.span);
551550
}
552551
ast::item_mac({node: ast::mac_invoc_tt(pth, tts), _}) => {
552+
print_visibility(s, item.vis);
553553
print_path(s, pth, false);
554554
word(s.s, ~"! ");
555555
print_ident(s, item.ident);
@@ -570,7 +570,7 @@ fn print_item(s: ps, &&item: @ast::item) {
570570

571571
fn print_enum_def(s: ps, enum_definition: ast::enum_def,
572572
params: ~[ast::ty_param], ident: ast::ident,
573-
span: ast::span) {
573+
span: ast::span, visibility: ast::visibility) {
574574
let mut newtype =
575575
vec::len(enum_definition.variants) == 1u &&
576576
ident == enum_definition.variants[0].node.name;
@@ -582,9 +582,9 @@ fn print_enum_def(s: ps, enum_definition: ast::enum_def,
582582
}
583583
if newtype {
584584
ibox(s, indent_unit);
585-
word_space(s, ~"enum");
585+
word_space(s, visibility_qualified(visibility, ~"enum"));
586586
} else {
587-
head(s, ~"enum");
587+
head(s, visibility_qualified(visibility, ~"enum"));
588588
}
589589

590590
print_ident(s, ident);
@@ -877,7 +877,7 @@ fn print_possibly_embedded_block_(s: ps, blk: ast::blk, embedded: embed_type,
877877
indented: uint, attrs: ~[ast::attribute],
878878
close_box: bool) {
879879
match blk.node.rules {
880-
ast::unsafe_blk => word(s.s, ~"unsafe"),
880+
ast::unsafe_blk => word(s.s, ~"unsafe "),
881881
ast::default_blk => ()
882882
}
883883
maybe_print_comment(s, blk.span.lo);

0 commit comments

Comments
 (0)