rust/crates/hir/src
bors 16c8deeb86 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`
2024-03-21 18:04:38 +00:00
..
semantics internal: Treat the self param as different from patterns when lowering 2024-03-11 09:46:28 +01:00
term_search chore: remove repetitive words 2024-03-19 22:14:13 +08:00
attrs.rs fix: Ignore generic arguments in intra doc link path resolution 2024-02-28 14:47:47 +01:00
db.rs Add tracing spans to macro generated database 2024-03-06 20:19:36 +01:00
diagnostics.rs internal: Treat the self param as different from patterns when lowering 2024-03-11 09:46:28 +01:00
display.rs fix: Fix wrong where clause rendering on hover 2024-03-16 17:49:59 +01:00
from_id.rs Eagerly lower enum variants in CrateDefMap construction 2024-01-15 10:24:14 +01:00
has_source.rs internal: Improve rooted upmapping 2024-03-12 13:46:58 +01:00
lib.rs Auto merge of #16835 - wyatt-herkamp:use_one_tt_for_a_derive, r=Veykril 2024-03-21 18:04:38 +00:00
semantics.rs Remove usages of SpanData where Span suffices 2024-03-15 13:02:40 +01:00
source_analyzer.rs internal: Treat the self param as different from patterns when lowering 2024-03-11 09:46:28 +01:00
symbols.rs internal: Improve rooted upmapping 2024-03-12 13:46:58 +01:00
term_search.rs Add make_tuple tactic 2024-02-26 20:17:09 +02:00