Skip to content

Commit 434f72c

Browse files
committed
---
yaml --- r: 114102 b: refs/heads/master c: 6878039 h: refs/heads/master v: v3
1 parent 00c029d commit 434f72c

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 25ac81eb8998e08add3eba703c701a0b9a65173f
2+
refs/heads/master: 6878039c122211f227d6c42b7f08282629ceb6c4
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/src/librustc/util/ppaux.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,17 +360,17 @@ pub fn ty_to_str(cx: &ctxt, typ: t) -> StrBuf {
360360
ty_uint(t) => ast_util::uint_ty_to_str(t, None,
361361
ast_util::AutoSuffix).to_strbuf(),
362362
ty_float(t) => ast_util::float_ty_to_str(t).to_strbuf(),
363-
ty_box(typ) => "@".to_strbuf() + ty_to_str(cx, typ),
364-
ty_uniq(typ) => "~".to_strbuf() + ty_to_str(cx, typ),
365-
ty_ptr(ref tm) => "*".to_strbuf() + mt_to_str(cx, tm),
363+
ty_box(typ) => format_strbuf!("@{}", ty_to_str(cx, typ)),
364+
ty_uniq(typ) => format_strbuf!("~{}", ty_to_str(cx, typ)),
365+
ty_ptr(ref tm) => format_strbuf!("*{}", mt_to_str(cx, tm)),
366366
ty_rptr(r, ref tm) => {
367367
let mut buf = region_ptr_to_str(cx, r);
368368
buf.push_str(mt_to_str(cx, tm).as_slice());
369369
buf
370370
}
371371
ty_tup(ref elems) => {
372372
let strs: Vec<StrBuf> = elems.iter().map(|elem| ty_to_str(cx, *elem)).collect();
373-
("(".to_strbuf() + strs.connect(",") + ")").to_strbuf()
373+
format_strbuf!("({})", strs.connect(","))
374374
}
375375
ty_closure(ref f) => {
376376
closure_to_str(cx, *f)

trunk/src/libsyntax/print/pprust.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,13 @@ impl<'a> State<'a> {
841841
match *tt {
842842
ast::TTDelim(ref tts) => self.print_tts(tts.as_slice()),
843843
ast::TTTok(_, ref tk) => {
844-
word(&mut self.s, parse::token::to_str(tk).as_slice())
844+
try!(word(&mut self.s, parse::token::to_str(tk).as_slice()));
845+
match *tk {
846+
parse::token::DOC_COMMENT(..) => {
847+
hardbreak(&mut self.s)
848+
}
849+
_ => Ok(())
850+
}
845851
}
846852
ast::TTSeq(_, ref tts, ref sep, zerok) => {
847853
try!(word(&mut self.s, "$("));
@@ -2238,7 +2244,7 @@ impl<'a> State<'a> {
22382244
ast::LitUint(u, t) => {
22392245
word(&mut self.s,
22402246
ast_util::uint_ty_to_str(t, Some(u),
2241-
ast_util::AutoSuffix).as_slice())
2247+
ast_util::ForceSuffix).as_slice())
22422248
}
22432249
ast::LitIntUnsuffixed(i) => {
22442250
word(&mut self.s, format!("{}", i))

0 commit comments

Comments
 (0)