diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-10 15:47:02 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-10 17:03:17 +1000 |
| commit | d6ebbbfcb203b969f9b6e02998efd9badbe885d6 (patch) | |
| tree | 627c46a24215839c32e463fe21e39363062f7cb4 /compiler/rustc_pattern_analysis/src | |
| parent | d8b6aa6d0dabc0c102f16f9f9bb35f687a63101c (diff) | |
| download | rust-d6ebbbfcb203b969f9b6e02998efd9badbe885d6.tar.gz rust-d6ebbbfcb203b969f9b6e02998efd9badbe885d6.zip | |
Factor out `AttrsTarget` flattening code.
This commit does the following. - Pulls the code out of `AttrTokenStream::to_token_trees` into a new function `attrs_and_tokens_to_token_trees`. - Simplifies `TokenStream::from_ast` by calling the new function. This is nicer than the old way, which created a temporary `AttrTokenStream` containing a single `AttrsTarget` (which required some cloning) just to call `to_token_trees` on it. (It is good to remove this use of `AttrsTarget` which isn't related to `cfg_attr` expansion.)
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions
