Skip to content

Commit a00814d

Browse files
committed
---
yaml --- r: 120284 b: refs/heads/dist-snap c: 6878039 h: refs/heads/master v: v3
1 parent 54e5561 commit a00814d

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
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 25ac81eb8998e08add3eba703c701a0b9a65173f
9+
refs/heads/dist-snap: 6878039c122211f227d6c42b7f08282629ceb6c4
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)

branches/dist-snap/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)