Commit graph

278854 commits

Author SHA1 Message Date
Laurențiu Nicola
bec452fac1
Merge pull request #19078 from lnicola/no-ci-forks
minor: Stop running some release workflows on forks and update old URLs
2025-02-01 18:15:53 +00: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
Laurențiu Nicola
ce8bace356
Merge pull request #19067 from cessen/update_tenthash
Update TentHash to version 1.0
2025-01-29 11:29:46 +00: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
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
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
Lukas Wirth
82efe0fb65
Merge pull request #19061 from Veykril/push-rwyqqtqmnput
Disable `Receiver` based autoderef temporarily
2025-01-28 14:08:49 +00:00
Lukas Wirth
8e68c3fc62 Disable Receiver based autoderef temporarily 2025-01-28 14:54:02 +01: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
Chayim Refael Friedman
165f2760ca
Merge pull request #19055 from vkrivopalov/fix-testdir-unused-variable-warning-on-freebsd
Add FreeBSD as a target OS for TestDir to avoid warnings
2025-01-27 20:16:57 +00: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
Laurențiu Nicola
5f2072c188 Fix syntactic highlighting for renames 2025-01-27 15:51:51 +02:00
Lukas Wirth
0fe9d77195
Merge pull request #19044 from ChayimFriedman2/deprecated-safe
fix: Fix #[rustc_deprecated_safe_2024]
2025-01-27 13:29:22 +00:00
Lukas Wirth
238d7bd1e4
Merge pull request #19045 from ChayimFriedman2/missing-token
fix: Fix a missing standard token in semantic highlighting
2025-01-27 13:23:42 +00:00
Chayim Refael Friedman
86d5e295d6 Fix a missing standard token in semantic highlighting
That was used as a fallback, causing a panic when the fallback was chosen.

I also made sure this won't happen again by guaranteeing in the macro generating the tokens that they all exist.
2025-01-27 15:08:00 +02:00
Chayim Refael Friedman
9a0504b716 Fix #[rustc_deprecated_safe_2024]
It should be considered by the edition of the caller, not the callee.

Technically we still don't do it correctly - we need the span of the method name (if it comes from a macro), but we don't keep it and this is good enough for now.
2025-01-27 14:35:20 +02:00
Lukas Wirth
ad0aea4323
Merge pull request #19001 from ShoyuVanilla/default-field-values
feat: Implement `default-field-values`
2025-01-27 11:45:07 +00:00
Shoyu Vanilla
c093db0ba1 Remove has_default from FieldId 2025-01-27 19:41:58 +09:00
Shoyu Vanilla
e4e7c95048 Fix a mistake in condition 2025-01-27 19:41:58 +09:00
Shoyu Vanilla
ec89b7d293 Add a test for field default value body as defining usage of TAIT 2025-01-27 19:41:58 +09:00
Shoyu Vanilla
c7463fe743 Implement HasResolver and HasModule for FieldId 2025-01-27 19:41:58 +09:00
Shoyu Vanilla
faeaf4ad21 Compute diagnostics of a field body iff it has one 2025-01-27 19:41:57 +09:00
Shoyu Vanilla
262216079a Merge record lit's ellipsis into pre-existing spread's variant 2025-01-27 19:41:54 +09:00