about summary refs log tree commit diff
path: root/src/test/parse-fail
diff options
context:
space:
mode:
authorTim Neumann <mail@timnn.me>2017-04-12 14:45:41 +0200
committerGitHub <noreply@github.com>2017-04-12 14:45:41 +0200
commit918e35a9bd95eab4d233aedc49168adb7c944f76 (patch)
tree1a74b9e3e59d3701b848af08d4fffb6dea123983 /src/test/parse-fail
parent49082ae9f296f1f7d5dddd0ced550c94688fa13f (diff)
parent44e414c4770ff0800c375ddbb8e0f46ee00bcab1 (diff)
downloadrust-918e35a9bd95eab4d233aedc49168adb7c944f76.tar.gz
rust-918e35a9bd95eab4d233aedc49168adb7c944f76.zip
Rollup merge of #41087 - estebank:tuple-float-index, r=arielb1
Use proper span for tuple index parsed as float

Fix diagnostic suggestion from:

```rust
help: try parenthesizing the first index
  |     (1, (2, 3)).((1, (2, 3)).1).1;
```

to the correct:

```rust
help: try parenthesizing the first index
  |     ((1, (2, 3)).1).1;
```

Fix #41081.
Diffstat (limited to 'src/test/parse-fail')
-rw-r--r--src/test/parse-fail/tuple-float-index.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/test/parse-fail/tuple-float-index.rs b/src/test/parse-fail/tuple-float-index.rs
deleted file mode 100644
index 57ad89ad374..00000000000
--- a/src/test/parse-fail/tuple-float-index.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main () {
-    (1, (2, 3)).1.1; //~ ERROR unexpected token
-                     //~^ HELP try parenthesizing the first index
-                     //~| SUGGESTION ((1, (2, 3)).1).1
-}