rust/crates/hir-def/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
..
attr Tweak delayed bug mentions. 2024-02-12 18:39:20 +11:00
body internal: Treat the self param as different from patterns when lowering 2024-03-11 09:46:28 +01:00
data Remove dead test code 2024-03-14 16:24:51 +01:00
dyn_map fix: Fix modules in blocks not resolving in ide layer 2024-02-26 14:54:47 +01:00
hir fix: Don't force draw a dependency edge to the real_span_map query 2024-03-07 14:14:59 +01:00
item_tree Repalce Span with SyntaxContextId in MacroCallLoc 2024-03-15 12:47:05 +01:00
macro_expansion_tests Resolve whether $pat is $pat_param or not via 🌟hygiene🌟 2024-03-21 10:22:45 +01:00
nameres Auto merge of #16835 - wyatt-herkamp:use_one_tt_for_a_derive, r=Veykril 2024-03-21 18:04:38 +00:00
path Merge commit 'a9116523604c998e7781f60d3b5a6f586e0414a9' into sync-from-ra 2024-01-21 16:53:06 +02:00
attr.rs Keep the span for Attr::Literal 2024-03-21 10:28:25 +01:00
body.rs internal: Treat the self param as different from patterns when lowering 2024-03-11 09:46:28 +01:00
builtin_type.rs
child_by_source.rs internal: Remove synstructure const hack support 2024-03-11 09:44:40 +01:00
data.rs Repalce Span with SyntaxContextId in MacroCallLoc 2024-03-15 12:47:05 +01:00
db.rs internal: Make def site span for proc-macro more invalidation resistant 2024-03-15 10:14:00 +01:00
dyn_map.rs
expander.rs fix: Don't force draw a dependency edge to the real_span_map query 2024-03-07 14:14:59 +01:00
find_path.rs fix: Don't force draw a dependency edge to the real_span_map query 2024-03-07 14:14:59 +01:00
generics.rs Merge commit 'ddf105b646c6749a2de2451c9a499a354eec79c2' into sync-from-ra 2024-02-11 08:40:19 +02:00
hir.rs fix: resolve sub-patterns inside range pattern 2024-03-05 19:31:20 +08:00
import_map.rs internal: Fetch toolchain and datalayout for DetachedFiles 2024-02-20 10:40:39 +01:00
item_scope.rs internal: Remove synstructure const hack support 2024-03-11 09:44:40 +01:00
item_tree.rs Repalce Span with SyntaxContextId in MacroCallLoc 2024-03-15 12:47:05 +01:00
lang_item.rs Keep the span for Attr::Literal 2024-03-21 10:28:25 +01:00
lib.rs Move Edition into span crate 2024-03-21 10:21:44 +01:00
lower.rs fix: Don't force draw a dependency edge to the real_span_map query 2024-03-07 14:14:59 +01:00
nameres.rs Move Edition into span crate 2024-03-21 10:21:44 +01:00
path.rs Merge commit 'a9116523604c998e7781f60d3b5a6f586e0414a9' into sync-from-ra 2024-01-21 16:53:06 +02:00
per_ns.rs Merge commit '0113bc9388b480fa42c632f57f4f0f7af5813ec1' into sync-from-ra 2024-02-04 10:37:58 +02:00
pretty.rs Merge commit 'a9116523604c998e7781f60d3b5a6f586e0414a9' into sync-from-ra 2024-01-21 16:53:06 +02:00
resolver.rs fix: Fix modules in blocks not resolving in ide layer 2024-02-26 14:54:47 +01:00
src.rs internal: Remove synstructure const hack support 2024-03-11 09:44:40 +01:00
test_db.rs Merge commit '0113bc9388b480fa42c632f57f4f0f7af5813ec1' into sync-from-ra 2024-02-04 10:37:58 +02:00
trace.rs Merge commit 'ddf105b646c6749a2de2451c9a499a354eec79c2' into sync-from-ra 2024-02-11 08:40:19 +02:00
visibility.rs fix: Don't force draw a dependency edge to the real_span_map query 2024-03-07 14:14:59 +01:00