diff options
| author | bors <bors@rust-lang.org> | 2023-06-09 18:53:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-09 18:53:58 +0000 |
| commit | 43062c43d2a63cf4e261c6eddc417575c4f3062f (patch) | |
| tree | e0d6040c2b9fb53c8070ba3b4e9bdaef6abd7731 /tests/rustdoc-js-std/quoted.js | |
| parent | 397641f3bd4f4211d0a1e9ada8d477bf495735b2 (diff) | |
| parent | 9fb266b525938f71089f23b49d756d77f550521b (diff) | |
| download | rust-43062c43d2a63cf4e261c6eddc417575c4f3062f.tar.gz rust-43062c43d2a63cf4e261c6eddc417575c4f3062f.zip | |
Auto merge of #112216 - est31:offset_of_deep_tuple, r=petrochenkov
Support float-like tuple indices in offset_of!() Supports invocations like `offset_of!((((), ()), ()), 0.0)`. This `0.0` gets tokenized as float literal, so it has to be broken up again. The code that did the breaking up was returning a finished `Expr`, while we need a `Ident`, so this PR splits up the `parse_expr_tuple_field_access_float` function into: * a function that breaks up the float literal (similar to `TokenKind::break_two_token_op`, but we do access the parser during this splitting operation, so we keep it as an inherent function on the parser) * and a function that constructs an `Expr` from it The former we can then re-use in `offset_of` parsing. The edge cases especially involving whitespaces are tricky so this adds a bunch of new tests as well. fixes #112204
Diffstat (limited to 'tests/rustdoc-js-std/quoted.js')
0 files changed, 0 insertions, 0 deletions
