Skip to content

Commit 6dfa549

Browse files
dtolnaypetrochenkov
authored andcommitted
Add tests in which the token really is a float
1 parent 776deb6 commit 6dfa549

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/test/ui/tuple/index-float.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fn main() {
2+
let tuple = (((),),);
3+
4+
let _ = tuple. 0.0; //~ ERROR unexpected token: `0.0`
5+
6+
let _ = tuple./*special cases*/0.0; //~ ERROR unexpected token: `0.0`
7+
}

src/test/ui/tuple/index-float.stderr

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: unexpected token: `0.0`
2+
--> $DIR/index-float.rs:4:20
3+
|
4+
LL | let _ = tuple. 0.0;
5+
| ^^^
6+
7+
error: unexpected token: `0.0`
8+
--> $DIR/index-float.rs:6:36
9+
|
10+
LL | let _ = tuple./*special cases*/0.0;
11+
| ^^^
12+
13+
error: aborting due to 2 previous errors
14+

0 commit comments

Comments
 (0)