about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-07-10 15:47:02 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-07-10 17:03:17 +1000
commitd6ebbbfcb203b969f9b6e02998efd9badbe885d6 (patch)
tree627c46a24215839c32e463fe21e39363062f7cb4 /compiler/rustc_pattern_analysis/src
parentd8b6aa6d0dabc0c102f16f9f9bb35f687a63101c (diff)
downloadrust-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