]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/float-field-interpolated.rs
Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup
[rust.git] / src / test / ui / parser / float-field-interpolated.rs
1 struct S(u8, (u8, u8));
2
3 macro_rules! generate_field_accesses {
4     ($a:tt, $b:literal, $c:expr) => {
5         let s = S(0, (0, 0));
6
7         s.$a; // OK
8         { s.$b; } //~ ERROR unexpected token: `1.1`
9                   //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1`
10         { s.$c; } //~ ERROR unexpected token: `1.1`
11                   //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1`
12     };
13 }
14
15 fn main() {
16     generate_field_accesses!(1.1, 1.1, 1.1);
17 }