about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/quoted.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-09 18:53:58 +0000
committerbors <bors@rust-lang.org>2023-06-09 18:53:58 +0000
commit43062c43d2a63cf4e261c6eddc417575c4f3062f (patch)
treee0d6040c2b9fb53c8070ba3b4e9bdaef6abd7731 /tests/rustdoc-js-std/quoted.js
parent397641f3bd4f4211d0a1e9ada8d477bf495735b2 (diff)
parent9fb266b525938f71089f23b49d756d77f550521b (diff)
downloadrust-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