Ali Bektas
bc5f61c769
Check if PatPtr resolves to ExprId
2025-02-09 17:31:45 +01:00
Ali Bektas
bf2f2c4d71
Fix clippy errors
2025-02-09 17:31:09 +01:00
Ali Bektas
fcc796829e
Remove fixme and add a missing test attribute
2025-02-09 17:31:09 +01:00
Ali Bektas
0d544cf622
Remove dbg lines
2025-02-09 17:31:09 +01:00
Ali Bektas
3e9633b461
resolve_bind_pat_to_const does not early return if expr
2025-02-09 17:31:09 +01:00
Ali Bektas
e402c8cd7e
make SourceAnalyzer::pat_id return ExprOrPatId
...
Not all patterns are mapped to Pats. As such, it was necessary to change
the ret type Option<PatId> to Option<ExprOrPatId>
2025-02-09 17:31:09 +01:00
Ali Bektas
050c63a054
Lower ast::Ident to hir::Path when lowering RangePats
2025-02-09 17:31:09 +01:00
Ali Bektas
8a18dce223
Add a test to monitor whats going on
2025-02-03 12:14:13 +01:00
Ali Bektas
31a5685144
Make higher levels adapt Bodys exprs having ExprOrPatId values
2025-02-03 12:14:13 +01:00
Ali Bektas
ee6b5cff4f
Make Pat::Range's start and end Option<ExprId>
2025-02-03 12:14:11 +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
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
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
Chayim Refael Friedman
1ba894350d
Report calling unsafe fn pointer as unsafe
2025-01-27 18:57:31 +02:00
Chayim Refael Friedman
b4508dc406
Don't suggest into_iter().method() on iterators
2025-01-27 18:48:20 +02:00
Chayim Refael Friedman
78feee84c2
Remove duplicate method from hir::Type
...
I added it by mistake in #18927 .
I chose to keep the method as not static, because it's more comfortable, and keep the name `add_reference()` and not `reference()`, because it is clearer and better matches `strip_reference[s]()`.
2025-01-27 18:40:01 +02:00
Laurențiu Nicola
d60afecd11
Merge pull request #19047 from lnicola/rename-highlight
...
fix: Fix syntactic highlighting for renames
2025-01-27 14:33:04 +00:00