Lukas Wirth
9a7fd6f4f0
Merge pull request #18422 from ChayimFriedman2/cursed-name-res
...
fix: Properly resolve prelude paths inside modules inside blocks
2024-10-28 13:45:19 +00:00
Lukas Wirth
003270d3e1
Merge pull request #18312 from LastExceed/symbolkind-variable
...
Report document symbols of kind `variable` for let statements
2024-10-28 13:40:42 +00:00
Lukas Wirth
25b0846e96
Merge pull request #18074 from ChayimFriedman2/typeref-source-map
...
internal: Build source map for `hir_def::TypeRef`s
2024-10-28 11:01:12 +00:00
Laurențiu Nicola
5346e847c4
Merge pull request #18256 from MoskalykA/use-is_none_or
...
Start using `Option::is_none_or`
2024-10-28 10:12:36 +00:00
Laurențiu Nicola
7ec20428cb
Merge pull request #18412 from lnicola/windows-no-gz
...
internal: Stop producing .gz artifacts for Windows
2024-10-28 10:11:29 +00:00
LastExceed
b889a11d79
add test
2024-10-27 23:29:14 +01:00
LastExceed
47e5759da9
add LetStmt arm
2024-10-27 23:29:14 +01:00
Chayim Refael Friedman
709805a5fd
Properly resolve prelude paths inside modules inside blocks
...
I.e. the following situation:
```
fn foo() {
mod bar {
fn qux() {
// Prelude path here (e.g. macro use prelude or extern prelude).
}
}
}
```
Those were previously unresolved, because, in order to support `self` and `super` properly, since #15148 we do not ascend block paths when there is a module in between, but only crate def maps register preludes, not block def maps, and we can't change this because block def map prelude can always be overridden by another block. E.g.
```
fn foo() {
struct WithTheSameNameAsPreludeItem;
{
WithTheSameNameAsPreludeItem
}
}
```
Here `WithTheSameNameAsPreludeItem` refer to the item from the top block, but if we would register prelude items in each block the child block would overwrite it incorrectly.
2024-10-27 19:23:12 +02:00
Lukas Wirth
14607bae1d
Merge pull request #18419 from ChayimFriedman2/leading-or
...
fix: Put leading `|` in patterns under `OrPat`
2024-10-27 11:25:16 +00:00
Chayim Refael Friedman
f50b201c86
Put leading |
in patterns under OrPat
...
Previously it was one level above, and that caused problems with macros that expand to it, because macros expect to get only one top-level node.
2024-10-27 13:11:38 +02:00
Lukas Wirth
0d441c3b4f
Merge pull request #18410 from Veykril/veykril/push-lvwxpnowqrxk
...
internal: Invert token iteration order in macro mapping
2024-10-27 10:44:32 +00:00
Lukas Wirth
6c70806b31
Invert token iteration order in macro mapping
2024-10-27 11:32:12 +01:00
Lukas Wirth
66a81d3764
Merge pull request #18418 from ChayimFriedman2/explicitly-disable
...
feat: Split `macro-error` diagnostic so users can ignore only parts of it
2024-10-27 09:37:56 +00:00
Lukas Wirth
59dd6422cc
Merge pull request #18417 from ChayimFriedman2/hash-string
...
fix: Correctly handle `#""` in edition <2024
2024-10-27 09:28:47 +00:00
Chayim Refael Friedman
071bd3c360
Split macro-error
diagnostic so users can ignore only parts of it
...
Split it into `macro-error`, `proc-macros-disabled` and `proc-macro-disabled`.
2024-10-27 02:24:15 +02:00
Chayim Refael Friedman
d6b26588a7
Correctly handle #""
in edition <2024
2024-10-27 00:47:13 +03:00
Laurențiu Nicola
56b0299039
Bump MSRV to 1.82
2024-10-26 09:39:23 +03:00
MoskalykA
f719ee7fc2
Use method syntax
2024-10-26 09:39:04 +03:00
MoskalykA
510090f774
Start using Option::is_none_or
2024-10-26 09:39:04 +03:00
Laurențiu Nicola
ed670e093a
Merge pull request #18415 from lnicola/nicer-remove-dbg
...
fix: Turn "Remove `dbg!`" into a quick fix for better prioritization
2024-10-26 06:21:26 +00:00
Laurențiu Nicola
fe425cd549
Turn Remove dbg into a quick fix for better prioritization
2024-10-26 09:06:10 +03:00
Laurențiu Nicola
08b504ae8f
Stop producing .gz artifacts for Windows
2024-10-25 15:14:52 +03:00
Lukas Wirth
57683cfe1f
Factor out token ranking
2024-10-25 12:03:12 +02:00
Lukas Wirth
cf5ab635ab
Merge pull request #18409 from Veykril/veykril/push-rkrkpvzvumvx
...
Only construct a resolver in macro descension when needed
2024-10-25 08:40:55 +00:00
Lukas Wirth
c6d1f78fa3
Only construct a resolver in macro descension when needed
2024-10-25 10:23:59 +02:00
Lukas Wirth
e37c6dc03e
Merge pull request #18408 from Veykril/veykril/push-ulxyznwzokut
...
fix: Don't compute diagnostics for non local files
2024-10-25 05:55:32 +00:00
Lukas Wirth
bf77cf7f90
Add server cancellation support to pull diagnostic handler
2024-10-25 07:39:28 +02:00
Lukas Wirth
1613548cdb
Don't compute diagnostics for non local files
2024-10-25 07:28:29 +02:00
Lukas Wirth
f2d12fff1f
Merge pull request #18407 from hackervole/code-fix-welcome-setup-tips
...
Fix formatting on welcome page, read only paths setting example
2024-10-25 05:15:39 +00:00
Chayim Refael Friedman
3f638482a3
Shrink TypeRef
from 16 from 32 bytes
...
Only references and arrays need to be boxed, and they comprise only 9.4% of the types (according to counting on r-a's code).
This saves 17mb.
2024-10-25 06:44:56 +03:00
Chayim Refael Friedman
fd7648d920
Shrink Path
to 16 bytes
...
Thanks to the observation (supported by counting) that the vast majority paths have neither generics no type anchors, and thanks to a new datastructure `ThinVecWithHeader` that is essentially `(T, Box<[U]>)` but with the size of a single pointer, we are able to reach this feat.
This (together with `ThinVecWithHeader`) makes the possibility to shrink `TypeRef`, because most types are paths.
2024-10-25 06:44:56 +03:00
HackerVole
183796ed0e
editors/code: Add md for walkthrough setup example
...
Add a separate markdown file containing the settings.json snippet from
the "Useful Setup Tips". This fixes the rendering and also makes the
text selectable.
Also use double-backticks for `code` rendering.
2024-10-24 23:20:40 -04:00
Chayim Refael Friedman
61d14ba937
Do not allocate attributes entry if there are no attributes
...
This saves 8mb.
2024-10-25 06:15:06 +03:00
Chayim Refael Friedman
a16a3d345f
Shrink ItemTreeSourceMaps
...
This saves 16mb on `analysis-stats .`.
2024-10-25 06:15:06 +03:00
Chayim Refael Friedman
fc5bce925c
Reuse empty GenericParams
...
This saves back 15mb that went for typeref source maps.
2024-10-25 06:15:06 +03:00
Chayim Refael Friedman
ab81593ed8
Fix memory usage calculation's queries list
2024-10-25 06:15:06 +03:00
Chayim Refael Friedman
a05b16bdb5
Build source map for hir_def::TypeRef
s
...
So that given a `TypeRef` we will be able to trace it back to source code.
This is necessary to be able to provide diagnostics for lowering to chalk tys, since the input to that is `TypeRef`.
This means that `TypeRef`s now have an identity, which means storing them in arena and not interning them, which is an unfortunate (but necessary) loss but also a pretty massive change. Luckily, because of the separation layer we have for IDE and HIR, this change never crosses the IDE boundary.
2024-10-25 06:15:04 +03:00
Laurențiu Nicola
aaae1d4c55
Merge pull request #18405 from lnicola/fix-changelog
...
internal: Update changelog generation for merge queues
2024-10-24 17:54:25 +00:00
Laurențiu Nicola
9832131fd5
Update changelog generation for merge queues
2024-10-24 20:40:57 +03:00
Lukas Wirth
0a8ebdf6a7
Merge pull request #18404 from Veykril/veykril/push-swpmkoqqxrvu
...
feat: Implement diagnostics pull model
2024-10-24 15:22:49 +00:00
Lukas Wirth
c5a1bd9342
feat: Implement diagnostics pull model
2024-10-24 17:09:43 +02:00
Lukas Wirth
bada8ba83a
Merge pull request #18402 from Veykril/veykril/push-wrvtystlszlr
...
internal: Improve proc-macro error msg for failed build scripts
2024-10-24 12:01:29 +00:00
Lukas Wirth
7e67a18c74
Merge pull request #18401 from Veykril/veykril/push-ulpowvsymyys
...
minor: Remove intermediate allocations
2024-10-24 11:48:27 +00:00
Lukas Wirth
e789a77003
internal: Improve proc-macro error msg for failed build scripts
2024-10-24 13:45:11 +02:00
Lukas Wirth
38e9da2068
minor: Remove intermediate allocations
2024-10-24 13:34:32 +02:00
Lukas Wirth
3c75b4a017
Merge pull request #18399 from Veykril/veykril/push-nnsoxqrwqkmv
...
Fix diagnostic enable config being ignored
2024-10-24 10:01:22 +00:00
Lukas Wirth
39881f5720
Fix diagnostic enable config being ignored
2024-10-24 11:47:12 +02:00
Lukas Wirth
981ea1955c
Merge pull request #18390 from ShoyuVanilla/issue-18308
...
fix: Prevent public re-export of private item
2024-10-24 09:25:06 +00:00
Laurențiu Nicola
7147bc90b2
Merge pull request #18396 from lnicola/hide-default-config
...
internal: Hide `Config::default_config`
2024-10-24 07:22:45 +00:00
Laurențiu Nicola
97eb4c7135
Bump smol_str
2024-10-24 10:08:31 +03:00