Skip to content

Commit 9f07e8a

Browse files
committed
---
yaml --- r: 4836 b: refs/heads/master c: 8c3ed86 h: refs/heads/master v: v3
1 parent fc00ec3 commit 9f07e8a

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: bc998c6140216b7857da63175612fab1e96e90cb
2+
refs/heads/master: 8c3ed8640b175ceeb1347415ed960532e20d64d2

trunk/src/comp/syntax/print/pprust.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,12 +1067,15 @@ fn print_expr(s: &ps, expr: &@ast::expr) {
10671067
word(s.s, " ");
10681068
print_block(s, meth.node.meth.body);
10691069
}
1070-
space(s.s);
10711070

10721071
// With object
10731072
alt anon_obj.inner_obj {
10741073
none. { }
1075-
some(e) { word_space(s, "with"); print_expr(s, e); }
1074+
some(e) {
1075+
space(s.s);
1076+
word_space(s, "with");
1077+
print_expr(s, e);
1078+
}
10761079
}
10771080
bclose(s, expr.span);
10781081
}

trunk/src/test/pretty/anon-obj.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// pp-exact
2+
3+
fn main() {
4+
let my_obj =
5+
obj () {
6+
fn foo() { }
7+
};
8+
let my_ext_obj =
9+
obj () {
10+
fn foo() { }
11+
with
12+
my_obj
13+
};
14+
}

0 commit comments

Comments
 (0)