Commit 918e35a
authored
Rollup merge of rust-lang#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 rust-lang#41081.File tree
3 files changed
+15
-6
lines changed- src
- libsyntax/parse
- test/ui/suggestions
3 files changed
+15
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2552 | 2552 | | |
2553 | 2553 | | |
2554 | 2554 | | |
2555 | | - | |
2556 | 2555 | | |
2557 | | - | |
| 2556 | + | |
2558 | 2557 | | |
| 2558 | + | |
2559 | 2559 | | |
2560 | 2560 | | |
2561 | 2561 | | |
| |||
2573 | 2573 | | |
2574 | 2574 | | |
2575 | 2575 | | |
2576 | | - | |
| 2576 | + | |
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
| |||
src/test/parse-fail/tuple-float-index.rs renamed to src/test/ui/suggestions/tuple-float-index.rs
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
17 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments