Commit graph

158555 commits

Author SHA1 Message Date
Chayim Refael Friedman
578ae16c93 Add a FIXME for feature(adt_const_params) 2025-02-04 21:28:19 +02:00
Lukas Wirth
1ba7a38e4f
Merge pull request #19084 from Veykril/push-muworpzpzqup
Split cache priming into distinct phases
2025-02-04 13:57:39 +00:00
Lukas Wirth
a373fb214d Expose symbol of CrateName 2025-02-04 14:38:58 +01:00
Lukas Wirth
93b72cefca
Merge pull request #19066 from alibektas/slice_pattern_type_inference
fix: try to infer array type from slice pattern
2025-02-03 14:03:50 +00:00
Lukas Wirth
08d4b033a4
Merge pull request #19086 from Veykril/push-ponvylutpnww
fix: Fix some mir eval/lowerings
2025-02-03 13:58:34 +00:00
Lukas Wirth
a118b18894 Fix some mir eval/lowerings 2025-02-03 14:42:41 +01:00
Lukas Wirth
9c981b7d7b
Merge pull request #19085 from Veykril/push-sknwykqmlott
Do not use make use of `InferenceResult::has_errors` flag for mir building
2025-02-03 12:43:14 +00:00
Lukas Wirth
5acbff815b Do not use make use of InferenceResult::has_errors flag for mir building
It generaly does not work as expected right now as we fallback type parameters to errors
2025-02-03 12:26:06 +01:00
Ali Bektas
806ec88963 Revert tests::patterns::infer_pattern
And apply requested changes
2025-02-03 12:23:13 +01:00
Lukas Wirth
3c8345842c
Merge pull request #19062 from darichey/scip-fix-module-names
Fix scip indexing of module names
2025-02-03 10:05:19 +00:00
Lukas Wirth
4d9be70709 Split cache priming into distinct phases 2025-02-03 10:47:53 +01:00
Lukas Wirth
acb9544ef8 More rustfmt hang investigations 2025-02-02 10:04:57 +01:00
Laurențiu Nicola
e70b589982 Stop running some release workflows on forks and update old URLs 2025-02-01 08:21:14 +02:00
Laurențiu Nicola
da96fffce0
Merge pull request #19072 from cessen/concat_uniquely
Fix #19071: ensure `completion_item_hash` serializes items uniquely
2025-01-30 08:15:31 +00:00
Nathan Vegdahl
7ffccb0346 Use to_ne_bytes instead of to_le_bytes 2025-01-29 20:21:57 +01:00
Nathan Vegdahl
615186586b Fix typo 2025-01-29 17:47:38 +01:00
Nathan Vegdahl
0cf275b9fe Fix #19071: ensure completion_item_hash serializes items uniquely
Previously it may have been possible for different completion items to
produce colliding hashes, not because of the hash but because of how
the items were serialized into byte streams for hashing. See #19071
for details.

The chances of that happening were low, if it was actually possible at
all. Nevertheless, this commit ensures that it definitely can't happen.

This commit uses a handful of techniques used to fix this, but they all
boil down to "ensure this could be re-parsed". If it's possible to parse
to recreate the original item, then by construction there is no chance
of two different items getting serialized to identical byte streams.
2025-01-29 17:22:13 +01:00
Lukas Wirth
9c30fecf09
Merge pull request #19070 from Veykril/push-wpqzmznymtrn
Remove mutable syntax tree shenanigans from adjustment hints
2025-01-29 13:58:18 +00:00
Lukas Wirth
0d9355ecdb Remove mutable syntax tree shenanigans from adjustment hints 2025-01-29 14:42:37 +01:00
Nathan Vegdahl
22b8339703 Update TentHash to version 1.0
The TentHash spec was frozen Jan 1st 2025, and release 1.0 of the Rust
crate is a minor cleanup as a follow-up to that, representing a
commitment to API stability as well.

The hash output remains the same as version 0.4, which rust-analyzer was
previously using. The only API change was a struct rename.
2025-01-29 12:07:20 +01:00
Ali Bektas
437921fb77 call infer_pats from infer::expr with context 2025-01-29 00:54:18 +01:00
Ali Bektas
14ab46691b Equip infer_pat_* with declaration origin 2025-01-29 00:54:18 +01:00
Ali Bektas
fc6c6b49c5 add test, bless tests 2025-01-29 00:54:18 +01:00
Ali Bektas
db07adf1d8 try to infer array type from slice pattern
rust-analyzer equivalent of rust-lang/rust#2827aa97
2025-01-29 00:54:18 +01:00
David Barsky
2386e95072
Merge pull request #19063 from davidbarsky/davidbarsky/backout-struct-default-fields
internal: backout `hir-*` changes from #19001
2025-01-28 16:45:45 +00:00
David Richey
19afce0c9c Update lsif_contains_generated_constant 2025-01-28 10:44:32 -06:00
Shoyu Vanilla
f10b622119 feat: Implement default-field-values only in parser 2025-01-28 11:30:47 -05:00
Lukas Wirth
a3556268b2
Merge pull request #19015 from Wilfred/mdbook
manual: Convert to mdbook
2025-01-28 16:19:37 +00:00
David Richey
d417284b6a Fix scip symbols for implicit modules 2025-01-28 10:14:04 -06:00
Lukas Wirth
8ecb754eea
Merge pull request #19056 from Giga-Bowser/fix-syntax-tree-crlf
fix: Properly handle CRLF line endings in the syntax tree view
2025-01-28 16:04:21 +00:00
Lukas Wirth
f70ac25966
Merge pull request #19057 from darichey/status-bar-in-output
Show status bar in RA output
2025-01-28 16:02:15 +00:00
David Richey
0a2221dcd6 Fix scip crate symbol name 2025-01-28 09:34:23 -06:00
Lukas Wirth
8e68c3fc62 Disable Receiver based autoderef temporarily 2025-01-28 14:54:02 +01:00
David Richey
1eb9f5e825 Fix scip inherent impl overflow 2025-01-27 23:20:16 -06:00
David Barsky
0f9cdebe4d Back out "feat: Implement default-field-values"
This backs out commit 7de0b2e75a541b98f735ee6fcd12d326be38d23f.
2025-01-27 17:30:35 -05:00
David Barsky
d039b1094c Back out "Handle missing fields diagnostics"
This backs out commit e6a103ae50699db1dbb0676d075a4bcda2247939.
2025-01-27 17:30:35 -05:00
David Barsky
10089c2b5b Back out "Merge record lit's ellipsis into pre-existing spread's variant"
This backs out commit c134b20c9cbc88a36e77acb8522e8dc4573bd906.
2025-01-27 17:30:35 -05:00
David Barsky
6f723ee9c7 Back out "Compute diagnostics of a field body iff it has one"
This backs out commit b4d4d02db8a95f5507fbd0aa90904d7b774f0027.
2025-01-27 17:30:35 -05:00
David Barsky
9c1a7ab5d8 Back out "Implement HasResolver and HasModule for FieldId"
This backs out commit ce9da9063097c26006886b3f403a0c50790c285a.
2025-01-27 17:30:34 -05:00
David Barsky
f22e331a40 Back out "Add a test for field default value body as defining usage of TAIT"
This backs out commit 4fe18a6fb5a1181a04c47391f558ebab5b8b0f39.
2025-01-27 17:30:34 -05:00
David Barsky
ff2656d671 Back out "Fix a mistake in condition"
This backs out commit e5c38558f5dbc37cbc91f9fda58144ce02e1f5aa.
2025-01-27 17:30:34 -05:00
David Barsky
a4e6556274 Back out "Remove has_default from FieldId"
This backs out commit 8aa6c09fcee6270c787a6f00615d76343fbe5c07.
2025-01-27 17:30:34 -05:00
David Richey
a9cd21f03d Show status bar in RA output 2025-01-27 14:20:05 -06:00
Giga Bowser
7268b3d81f fix: Properly handle CRLF line endings in the syntax tree view 2025-01-27 15:09:58 -05:00
Vladimir Krivopalov
3dd95e3767 Add FreeBSD as a target OS for TestDir to avoid warnings
Currently, running rust-analyzer tests on FreeBSD produces an "unused
variable" warning. The code is fully compatible with FreeBSD and doesn't
have to be omitted.

Signed-off-by: Vladimir Krivopalov <vladimir@krivopalov.ru>
2025-01-27 14:53:56 -05:00
Lukas Wirth
cadc468b45
Merge pull request #19051 from ChayimFriedman2/fn-ptr-unsafe
fix: Report calling unsafe fn pointer as unsafe
2025-01-27 17:42:06 +00:00
Lukas Wirth
da33e7ce8a
Merge pull request #19050 from ChayimFriedman2/iter-self
fix: Don't suggest `into_iter().method()` on iterators
2025-01-27 17:41:02 +00:00
Lukas Wirth
8ed922785e
Merge pull request #19049 from ChayimFriedman2/add-reference-ty
minor: Remove duplicate method from `hir::Type`
2025-01-27 17:40:09 +00:00
Lukas Wirth
30b606332c
Merge pull request #19052 from Veykril/push-yqwutllwwyyp
Prioritize formatting thread tasks in main_loop
2025-01-27 17:40:07 +00:00
Lukas Wirth
26c57086f6 Prioritize formatting thread tasks in main_loop 2025-01-27 18:23:42 +01:00