Chayim Refael Friedman
0d4af7bce3
Fix a bug with missing binding in MBE
...
We should immediately mark them as finished, on the first entry.
The funny (or sad) part was that this bug was pre-existing, but previously to #18327 , it was causing us to generate bindings non-stop, 65535 of them, until we get to the hardcoded repetition limit, and then throw it all away. And it was so Blazingly Fast that nobody noticed.
With #18327 however, this is still what happens, except that now instead of *merging* the fragments into the result, we write them on-demand. Meaning that when we hit the limit, we've already written all previous entries. This is a minor change, I thought for myself when I was writing this, and it's actually for the better, so who cares. Minor change? Not so fast. This caused us to emit 65535 repetitions, all of which the MBE infra needs to handle when calling other macros with the expansion, and convert to rowan tree etc., which resulted a *massive* hang.
The test (and also `analysis-stats`) used to crash with stack overflow on this macro, because we were dropping some crazily deep rowan tree. Now they work properly. Because I am lazy, and also because I could not find the exact conditions that causes a macro match but with a missing binding, I just copied all macros from tracing. Easy.
2025-01-07 23:04:53 +02:00
Laurențiu Nicola
f5e698d0b0
Merge from rust-lang/rust
2025-01-07 17:57:53 +02:00
Lukas Wirth
fff668052b
Merge pull request #18870 from Veykril/push-vnpsptpolyol
...
Drop unnecessary tracing::warn
2025-01-07 13:55:28 +00:00
Lukas Wirth
619af1871b
Merge pull request #18867 from Veykril/push-ntmxlropxkrr
...
internal: target-triple -> target-tuple + version fetching cleanup
2025-01-07 13:46:58 +00:00
Lukas Wirth
bff9bd0286
Drop unnecessary tracing::warn
...
We already emit an error
2025-01-07 14:40:00 +01:00
Lukas Wirth
59c8e27acc
Add some smoke tests to toolchain_info
2025-01-07 14:33:24 +01:00
Lukas Wirth
b8a0488740
Align toolchain version fetching with other toolchain info querying
...
Fix --target flag argument order in rustc_cfg fetching
2025-01-07 14:30:46 +01:00
Lukas Wirth
2ac803ec71
target-triple -> target-tuple
2025-01-07 14:25:43 +01:00
Lukas Wirth
86d35a55a6
Merge pull request #18788 from Veykril/push-zxystwnotuvq
...
Remove `rust-analyzer.cargo.sysrootQueryMetadata` config again
2025-01-07 13:14:29 +00:00
Lukas Wirth
f1c0d176f3
Remove rust-analyzer.cargo.sysrootQueryMetadata
config again
2025-01-07 14:00:22 +01:00
Lukas Wirth
efb87743be
Merge pull request #18864 from alexkirsz/alexkirsz/fix-diagnostics-clearing
...
fix: Fix diagnostics not clearing between flychecks
2025-01-07 12:16:18 +00:00
Chayim Refael Friedman
2ffdbc3f3d
Merge pull request #18832 from vishruth-thimmaiah/fix_string_comp
...
fix: do not offer completions within macro strings
2025-01-07 12:11:59 +00:00
Bogdan Mircea
4382331a36
project-model: fix JSON project PackageRoot buildfile inclusion
2025-01-07 13:47:17 +02:00
Vishruth-Thimmaiah
cb0221d774
fix: do not offer completions within macro strings
2025-01-07 17:02:28 +05:30
Alex Kirszenberg
fe54502f11
lint
2025-01-07 12:07:37 +01:00
Alex Kirszenberg
f2b789c36e
fix: Fix diagnostics not clearing between flychecks
2025-01-07 11:11:04 +01:00
Laurențiu Nicola
cd12ef8547
Merge pull request #18853 from ChayimFriedman2/no-completion
...
Fix case where completion inside macro that expands to `#[test]` was unavailable
2025-01-07 06:44:50 +00:00
David Barsky
140f91b045
fix: clear diagnostics on cancel unconditionally, fixing #18854
2025-01-06 18:41:21 -05:00
Chayim Refael Friedman
b24142b50b
Fix case where completion inside macro that expands to #[test]
was unavailable
...
We ignore `#[test]` in the def map, so that's why it failed.
2025-01-06 22:02:24 +02:00
Laurențiu Nicola
bfb81275fb
Merge pull request #18852 from ChayimFriedman2/proc-macro-panic
...
fix: Fix a bug that was caused by fixup reversing
2025-01-06 18:38:24 +00:00
Chayim Refael Friedman
f7c4833830
Fix a bug that was caused by fixup reversing
2025-01-06 20:06:20 +02:00
Lukas Wirth
72b9427162
Merge pull request #18846 from Veykril/push-kmspklwynynu
...
minor: New clippy lints
2025-01-06 17:12:14 +00:00
Lukas Wirth
4b6007115a
minor: New clippy lints
2025-01-06 17:57:17 +01:00
Lukas Wirth
dd73ff4ee4
fix: Fix non-cargo flychecks immediately clearing received diagnostics
2025-01-06 13:44:30 +01:00
Lukas Wirth
47ee513fa4
Merge pull request #18836 from Veykril/push-kksuoxxptvty
...
fix: Be more permissive with completion resolve data
2025-01-06 10:37:01 +00:00
Lukas Wirth
8a9cacb22d
fix: Be more permissive with completion resolve data
2025-01-06 11:22:42 +01:00
Lukas Wirth
c89c03fd5a
Merge pull request #18845 from Veykril/push-yyuolqomnkys
...
fix: Fix flycheck getting confused which package to check
2025-01-06 10:21:26 +00:00
Lukas Wirth
e4bf6e1bc3
fix: Fix flycheck getting confused which package to check
2025-01-06 11:05:51 +01:00
Lukas Wirth
5769685199
Merge pull request #18843 from Veykril/push-usuzxtzsnrpt
...
fix: Handle newstyle `rustc_intrinsic` safety correctly
2025-01-06 09:00:32 +00:00
Lukas Wirth
e462ee79e4
fix: Handle newstyle rustc_intrinsic
safety correctly
2025-01-06 09:47:31 +01:00
Lukas Wirth
cf2bfd427a
fix: Fix relative .cargo env vars not working
2025-01-06 08:50:41 +01:00
Chayim Refael Friedman
ce323627c5
Support the new CoercePointee
derive
2025-01-04 18:35:53 +02:00
Lukas Wirth
061d257e90
Merge pull request #18835 from Veykril/push-wnmwwoktmpyt
...
Hide synthetic locals from completions
2025-01-04 16:03:00 +00:00
Lukas Wirth
bf7597cd5a
Hide synthetic locals from completions
2025-01-04 16:48:08 +01:00
Lukas Wirth
a440fcb698
Merge pull request #18806 from LHolten/deduplicate-crate-graph
...
fix: Deduplicate crate graph
2025-01-03 14:56:14 +00:00
Lukas Wirth
fd2cb645b7
Merge pull request #18830 from alibektas/18814
...
fix: 18814
2025-01-03 13:52:09 +00:00
Ali Bektas
a0898b9698
fix: 18814
2025-01-03 14:36:40 +01:00
Laurențiu Nicola
c528b56b92
Merge pull request #18828 from lnicola/edition-description
...
minor: Add description field to edition manifest
2025-01-03 12:47:18 +00:00
Lukas Wirth
3d6300330d
Merge pull request #18827 from Veykril/push-zqsplmtwsxxk
...
minor: Honor `CARGO_TARGET_DIR` for cargo target dir config
2025-01-03 12:43:43 +00:00
Laurențiu Nicola
c8da114dfd
Add description field to edition manifest
2025-01-03 14:32:35 +02:00
Lukas Wirth
7d203673f5
minor: Honor CARGO_TARGET_DIR
for cargo target dir config
2025-01-03 13:28:52 +01:00
Lukas Wirth
ce6053cbd6
Merge pull request #18826 from Veykril/push-qnsqormwlwqm
...
fix: Clear flycheck diagnostics per package properly
2025-01-03 12:26:33 +00:00
Lukas Wirth
6e5e44d0fd
fix: Clear flycheck diagnostics per package properly
2025-01-03 13:12:05 +01:00
Lukas Wirth
b67de74de9
Merge pull request #18825 from Veykril/push-sllokkprznkq
...
minor: Encode TraitData bools as bitflags
2025-01-03 12:01:08 +00:00
Lukas Wirth
4d66fa797f
minor: Encode TraitData bools as bitflags
2025-01-03 12:46:07 +01:00
Lukas Wirth
db55d9ade0
Merge pull request #18822 from bryceberger/targetdir-absolute
...
allow targetDir to be an absolute path
2025-01-03 11:33:57 +00:00
Lukas Wirth
b6910ed1b2
Merge pull request #18327 from ChayimFriedman2/flat-tt
...
Store token trees in contiguous `Vec` instead of as a tree
2025-01-03 11:31:58 +00:00
Bryce Berger
5c143aa65d
allow targetDir to be an absolute path
2025-01-02 15:51:54 -05:00
Chayim Refael Friedman
ceba289f80
Store token trees in contiguous Vec
instead of as a tree
...
I expected this to be faster (due to less allocations and better cache locality), but benchmarked it is not (neither it is slower). Memory usage, however, drops by ~50mb (of `analysis-stats .`). I guess tt construction is just not hot.
This also simplifies using even less memory for token trees by compressing equal span, which I plan to do right after.
Some workflows are more easily expressed with a flat tt, while some are better expressed with a tree. With the right helpers, though (which was mostly a matter of trial and error), even the worst workflows become very easy indeed.
2025-01-02 19:21:46 +02:00
lucasholten
81153940be
Remove rust-analyzer duplicate crates integration tests
2025-01-02 15:52:06 +01:00