Laurențiu Nicola
4c94e69115
Add in-rust-tree feature to hir-expand
2024-04-20 18:44:27 +03:00
Lukas Wirth
6bfdd38c69
Render matched macro arm on hover of macro calls
2024-04-18 10:51:58 +02:00
bors
46702ffc1a
Auto merge of #17087 - davidbarsky:david/fix-some-tracing-spans, r=Veykril
...
chore: fix a few spans without `.entered()`
2024-04-17 16:59:33 +00:00
Lukas Wirth
011c2127c8
Update per_query_memory_usage
query listing
2024-04-17 18:44:50 +02:00
David Barsky
5ba37f3f8e
chore: fix a few spans without .entered()
2024-04-17 12:44:49 -04:00
Lukas Wirth
531a270d91
Generally optimize diagnostics performance
2024-04-15 22:15:41 +02:00
Lukas Wirth
1915980031
fix: Fix impl Trait<Self>
causing stackoverflows
2024-04-15 15:41:20 +02:00
Lukas Wirth
a82e028e30
Cleanup util::Generics method names
2024-04-06 14:29:40 +02:00
Lukas Wirth
f3567bb604
Arc CrateData::cfg_options
2024-04-06 13:55:10 +02:00
Lukas Wirth
5957835cdf
Consider exported_name="main"
functions in test modules as tests
2024-04-04 14:51:10 +02:00
Lukas Wirth
86967032f7
Consider ADT generic parameter defaults for unsubstituted layout calculations
2024-04-03 09:01:27 +02:00
bors
c3b8c2a254
Auto merge of #16996 - Veykril:lt-err, r=Veykril
...
internal: Lower outlive goals, respect them in display impls
2024-04-02 14:13:22 +00:00
Lukas Wirth
707be6b99c
Adjust display impls to respect lifetime bounds
2024-04-02 14:51:08 +02:00
Lukas Wirth
0927f86247
Replace static_lifetime usages with error_lifetime, lower outlives goals
2024-04-02 14:51:06 +02:00
bors
23dd54b010
Auto merge of #16968 - roife:fix-issue-16801, r=Veykril
...
fix: silence mismatches involving unresolved projections
fix #16801
2024-04-01 20:05:33 +00:00
roife
3d373fec8c
tests: add tests for mismatches with unresolved projections
2024-04-02 01:32:43 +08:00
roife
8d6b65c544
fix: silence mismatches involving unresolved projections
2024-04-02 01:27:22 +08:00
dfireBird
69c4ac6304
implement len and is_empty method in generic_params
2024-03-29 18:26:46 +05:30
dfireBird
34a8cd6a7a
fix ADT hover considering only type or const len not lifetimes
2024-03-28 21:53:22 +05:30
bors
0583aaa555
Auto merge of #16805 - dfireBird:lifetime_lowering, r=Veykril
...
feat: Implement resolving and lowering of Lifetimes (no inference yet)
2024-03-26 07:58:43 +00:00
Young-Flash
ba8c9810aa
review update
2024-03-25 19:55:19 +08:00
Young-Flash
1c85234bcd
limit struct field hover display nums
2024-03-25 19:55:19 +08:00
Lukas Wirth
8e324e98a1
Rename ProcMacroKind::FuncLike to Bang
2024-03-22 11:20:56 +01:00
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
Wyatt Herkamp
262e06f1ef
Remove MacroCallKind::DeriveAttr
2024-03-21 12:50:58 -04:00
Wyatt Herkamp
2c2bbe07fd
Treat Derive Macro specially.
2024-03-21 08:07:54 -04:00
Wyatt Herkamp
15d183be79
Initial Attempt limiting number of token tree in macro expansion.
2024-03-21 08:06:43 -04:00
Lukas Wirth
928d847cc2
Keep the span for Attr::Literal
2024-03-21 10:28:25 +01:00
Lukas Wirth
255a8aef92
Move Edition into span crate
2024-03-21 10:21:44 +01:00
bors
dc2e0b35cc
Auto merge of #16891 - goodmost:master, r=lnicola
...
chore: remove repetitive words
2024-03-21 06:29:33 +00:00
goodmost
d6b0aae019
chore: remove repetitive words
...
Signed-off-by: goodmost <zhaohaiyang@outlook.com>
2024-03-19 22:14:13 +08:00
Shoyu Vanilla
967a864d03
fix: Goto implementation to impls inside blocks
2024-03-19 22:04:48 +09:00
dfireBird
d6e3929841
include lifetime in ParamKind and in Generics::provenance_split
2024-03-18 17:18:08 +05:30
Matthias Krüger
2a8edaa14d
remove redundant clone()s
2024-03-17 14:06:21 +01:00
Lukas Wirth
d69a81fddb
fix: Fix wrong where clause rendering on hover
2024-03-16 17:49:59 +01:00
Lukas Wirth
0dd89d7ee7
Remove usages of SpanData where Span suffices
2024-03-15 13:02:40 +01:00
Lukas Wirth
d2f8eae2ec
feat: Support macro calls in eager macros for IDE features
2024-03-14 15:40:35 +01:00
Lukas Wirth
9ba4493918
internal: Improve rooted upmapping
2024-03-12 13:46:58 +01:00
bors
2f872156fe
Auto merge of #16808 - ShoyuVanilla:proc-macro-sem-token, r=Veykril
...
feat: Add proc macro semantic token type
Closes #11529
2024-03-11 13:20:29 +00:00
Shoyu Vanilla
fc11216ad5
feat: Add proc macro semantic token type
2024-03-11 22:14:59 +09:00
bors
2320e12541
Auto merge of #16771 - Veykril:self-param-split, r=Veykril
...
internal: Don't desugar self param into a pattern
Small experiment to see if this simplifies things
2024-03-11 12:45:46 +00:00
bors
a5035f4931
Auto merge of #16749 - Veykril:on-demand-validation-err, r=Veykril
...
internal: Some method resolution cleanups
2024-03-11 09:18:24 +00:00
Lukas Wirth
458f4a2960
internal: Treat the self param as different from patterns when lowering
2024-03-11 09:46:28 +01:00
Lukas Wirth
558feeab61
internal: Remove synstructure const hack support
2024-03-11 09:44:40 +01:00
Lukas Wirth
c04c0dd5ba
fix: Don't force draw a dependency edge to the real_span_map query
2024-03-07 14:14:59 +01:00
Lukas Wirth
a3b6e891ea
Add tracing spans to macro generated database
2024-03-06 20:19:36 +01:00
Vincent Esche
bf141310f8
Add fn index()
accessor for hir::Param
2024-03-05 16:02:22 +01:00
Vincent Esche
1afeea85ff
Add fn parent_fn()
accessors for hir::Param
& hir::SelfParam
2024-03-05 16:01:01 +01:00
Lukas Wirth
d21f88883b
Remove some unnecessary cloning in method_resolution
2024-03-05 12:39:27 +01:00
bors
676455f911
Auto merge of #16757 - Veykril:style-lints, r=Veykril
...
fix: Put style lints behind disabled-by-default config
Fixes https://github.com/rust-lang/rust-analyzer/issues/16542
Fixes https://github.com/rust-lang/rust-analyzer/issues/16725
cc https://github.com/rust-lang/rust-analyzer/issues/16628
Our diagnostic infra is not yet setup for those kinds of diagnostics
2024-03-05 10:45:05 +00:00