Commit e2ba9d1
committed
Add test for using $:literal to index a tuple
Currently fails to build:
error: unexpected token: `0`
--> src/test/ui/macros/macro-interpolation.rs:19:16
|
LL | $var . $field
| ^^^^^^
...
LL | let _ = field!(tuple.0);
| --------------- in this macro invocation
|
= note: this error originates in the macro `field` (in Nightly builds, run with -Z macro-backtrace for more info)
error: macro expansion ignores token `0` and any following
--> src/test/ui/macros/macro-interpolation.rs:19:16
|
LL | $var . $field
| ^^^^^^
...
LL | let _ = field!(tuple.0);
| --------------- caused by the macro expansion here
|
= note: the usage of `field!` is likely invalid in expression context
error: aborting due to 2 previous errors1 parent e5e2b0b commit e2ba9d1
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
0 commit comments