about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorchristopherdumas <christopherdumas@me.com>2015-09-02 15:48:21 -0700
committerchristopherdumas <christopherdumas@me.com>2015-09-14 07:26:11 -0700
commitafa905fcf59580ac76b3e3677b5d9c82b4a19169 (patch)
tree2aa4d1ca247924fab379a1387dcc8ae900de923a /src/libsyntax/parse/parser.rs
parentb7b1dced3c0ab90144b4844498a3b678d690b20e (diff)
downloadrust-afa905fcf59580ac76b3e3677b5d9c82b4a19169.tar.gz
rust-afa905fcf59580ac76b3e3677b5d9c82b4a19169.zip
Fix tuple float bug.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0772d124db8..265f435978c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2363,7 +2363,7 @@ impl<'a> Parser<'a> {
                         self.fileline_help(last_span,
                             &format!("try parenthesizing the first index; e.g., `(foo.{}){}`",
                                     float.trunc() as usize,
-                                    &float.fract().to_string()[1..]));
+                                    format!(".{}", fstr.splitn(2, ".").last().unwrap())));
                     }
                     self.abort_if_errors();