Skip to content

Commit c97c152

Browse files
committed
---
yaml --- r: 20755 b: refs/heads/snap-stage3 c: c2f49c4 h: refs/heads/master i: 20753: d583cfe 20751: cc8fd37 v: v3
1 parent fba9c86 commit c97c152

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: fd52df1901e876a0705f16295f689cfc5727262d
4+
refs/heads/snap-stage3: c2f49c46ae0b07aae8ae558d5a5e71ed85aeff23
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libsyntax/parse/token.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,13 @@ fn to_str(in: interner<@~str>, t: token) -> ~str {
165165
LIT_INT_UNSUFFIXED(i) {
166166
int::to_str(i as int, 10u)
167167
}
168-
LIT_FLOAT(s, t) { *in.get(s) + ast_util::float_ty_to_str(t) }
168+
LIT_FLOAT(s, t) {
169+
let mut body = *in.get(s);
170+
if body.ends_with(".") {
171+
body = body + "0"; // `10.f` is not a float literal
172+
}
173+
body + ast_util::float_ty_to_str(t)
174+
}
169175
LIT_STR(s) { ~"\"" + str::escape_default( *in.get(s)) + ~"\"" }
170176

171177
/* Name components */

0 commit comments

Comments
 (0)