about summary refs log tree commit diff
path: root/tests/coverage/branch/lazy-boolean.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-21 18:04:38 +0000
committerbors <bors@rust-lang.org>2024-03-21 18:04:38 +0000
commit16c8deeb8607848c24f033c314162a10c61cafb0 (patch)
tree9c73a03aa622c0e87ca9b2e6c1448143b03412eb /tests/coverage/branch/lazy-boolean.rs
parenta3d96253a91aed015d1dff03523c17e9c1023434 (diff)
parentc381d0fc64e02898ec77617a14e16431595b8906 (diff)
downloadrust-16c8deeb8607848c24f033c314162a10c61cafb0.tar.gz
rust-16c8deeb8607848c24f033c314162a10c61cafb0.zip
Auto merge of #16835 - wyatt-herkamp:use_one_tt_for_a_derive, r=Veykril
Have Derive Attribute share a token tree with it's proc macros.

The goal of this PR is to stop creating a token tree for each derive proc macro.

This is done by giving the derive proc macros an id to its parent derive element.

From running the analysis stat on the rust analyzer project I did see a small memory decrease.

```
Inference:           42.80s, 362ginstr, 591mb
MIR lowering:        8.67s, 67ginstr, 291mb
Mir failed bodies: 18 (0%)
Data layouts:        85.81ms, 609minstr, 8mb
Failed data layouts: 135 (6%)
Const evaluation:    440.57ms, 5235minstr, 13mb
Failed const evals: 1 (0%)
Total:               64.16s, 552ginstr, 1731mb
```
After Change
```
Inference:           40.32s, 340ginstr, 593mb
MIR lowering:        7.95s, 62ginstr, 292mb
Mir failed bodies: 18 (0%)
Data layouts:        87.97ms, 591minstr, 8mb
Failed data layouts: 135 (6%)
Const evaluation:    433.38ms, 5226minstr, 14mb
Failed const evals: 1 (0%)
Total:               60.49s, 523ginstr, 1680mb
```

Currently this breaks the expansion for the actual derive attribute.

## TODO
- [x] Pick a better name for the function `smart_macro_arg`
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions