Add tests in which the token really is a float
This commit is contained in:
parent
776deb6b9f
commit
6dfa549fb5
2 changed files with 21 additions and 0 deletions
7
src/test/ui/tuple/index-float.rs
Normal file
7
src/test/ui/tuple/index-float.rs
Normal 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`
|
||||
}
|
14
src/test/ui/tuple/index-float.stderr
Normal file
14
src/test/ui/tuple/index-float.stderr
Normal 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
|
||||
|
Loading…
Add table
Reference in a new issue