Add tests in which the token really is a float

This commit is contained in:
David Tolnay 2020-03-26 09:36:05 -07:00 committed by Vadim Petrochenkov
parent 776deb6b9f
commit 6dfa549fb5
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,7 @@
fn main() {
let tuple = (((),),);
let _ = tuple. 0.0; //~ ERROR unexpected token: `0.0`
let _ = tuple./*special cases*/0.0; //~ ERROR unexpected token: `0.0`
}

View file

@ -0,0 +1,14 @@
error: unexpected token: `0.0`
--> $DIR/index-float.rs:4:20
|
LL | let _ = tuple. 0.0;
| ^^^
error: unexpected token: `0.0`
--> $DIR/index-float.rs:6:36
|
LL | let _ = tuple./*special cases*/0.0;
| ^^^
error: aborting due to 2 previous errors