about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates
AgeCommit message (Collapse)AuthorLines
2025-01-30Merge pull request #19072 from cessen/concat_uniquelyLaurențiu Nicola-25/+51
Fix #19071: ensure `completion_item_hash` serializes items uniquely
2025-01-29Use `to_ne_bytes` instead of `to_le_bytes`Nathan Vegdahl-9/+9
2025-01-29Fix typoNathan Vegdahl-2/+2
2025-01-29Fix #19071: ensure `completion_item_hash` serializes items uniquelyNathan Vegdahl-24/+50
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-29Merge pull request #19070 from Veykril/push-wpqzmznymtrnLukas Wirth-71/+148
Remove mutable syntax tree shenanigans from adjustment hints
2025-01-29Remove mutable syntax tree shenanigans from adjustment hintsLukas Wirth-71/+148
2025-01-29Update TentHash to version 1.0Nathan Vegdahl-4/+4
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-29Auto merge of #136117 - lnicola:sync-from-ra, r=lnicolabors-1293/+2031
Subtree update of `rust-analyzer` r? `@ghost`
2025-01-29call infer_pats from infer::expr with contextAli Bektas-5/+4
2025-01-29Equip infer_pat_* with declaration originAli Bektas-26/+101
2025-01-29add test, bless testsAli Bektas-3/+22
2025-01-29try to infer array type from slice patternAli Bektas-1/+62
rust-analyzer equivalent of rust-lang/rust#2827aa97
2025-01-28parse_format optimize import useMarijn Schouten-2/+2
2025-01-28Merge pull request #19063 from ↵David Barsky-625/+78
davidbarsky/davidbarsky/backout-struct-default-fields internal: backout `hir-*` changes from #19001
2025-01-28Update lsif_contains_generated_constantDavid Richey-76/+80
2025-01-28feat: Implement `default-field-values` only in parserShoyu Vanilla-16/+280
2025-01-28Merge pull request #19015 from Wilfred/mdbookLukas Wirth-314/+251
manual: Convert to mdbook
2025-01-28Fix scip symbols for implicit modulesDavid Richey-13/+30
2025-01-28Merge pull request #19056 from Giga-Bowser/fix-syntax-tree-crlfLukas Wirth-34/+65
fix: Properly handle CRLF line endings in the syntax tree view
2025-01-28Fix scip `crate` symbol nameDavid Richey-5/+17
2025-01-28Disable `Receiver` based autoderef temporarilyLukas Wirth-6/+8
2025-01-27Fix scip inherent impl overflowDavid Richey-6/+6
2025-01-27Back out "feat: Implement `default-field-values`"David Barsky-647/+31
This backs out commit 7de0b2e75a541b98f735ee6fcd12d326be38d23f.
2025-01-27Back out "Handle missing fields diagnostics"David Barsky-59/+12
This backs out commit e6a103ae50699db1dbb0676d075a4bcda2247939.
2025-01-27Back out "Merge record lit's ellipsis into pre-existing spread's variant"David Barsky-55/+34
This backs out commit c134b20c9cbc88a36e77acb8522e8dc4573bd906.
2025-01-27Back out "Compute diagnostics of a field body iff it has one"David Barsky-64/+22
This backs out commit b4d4d02db8a95f5507fbd0aa90904d7b774f0027.
2025-01-27Back out "Implement `HasResolver` and `HasModule` for `FieldId`"David Barsky-20/+19
This backs out commit ce9da9063097c26006886b3f403a0c50790c285a.
2025-01-27Back out "Add a test for field default value body as defining usage of TAIT"David Barsky-141/+27
This backs out commit 4fe18a6fb5a1181a04c47391f558ebab5b8b0f39.
2025-01-27Back out "Fix a mistake in condition"David Barsky-1/+2
This backs out commit e5c38558f5dbc37cbc91f9fda58144ce02e1f5aa.
2025-01-27Back out "Remove `has_default` from `FieldId`"David Barsky-35/+64
This backs out commit 8aa6c09fcee6270c787a6f00615d76343fbe5c07.
2025-01-27fix: Properly handle CRLF line endings in the syntax tree viewGiga Bowser-34/+65
2025-01-27Add FreeBSD as a target OS for TestDir to avoid warningsVladimir Krivopalov-2/+7
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-27Merge pull request #19051 from ChayimFriedman2/fn-ptr-unsafeLukas Wirth-1/+19
fix: Report calling unsafe fn pointer as unsafe
2025-01-27Merge pull request #19050 from ChayimFriedman2/iter-selfLukas Wirth-1/+36
fix: Don't suggest `into_iter().method()` on iterators
2025-01-27Merge pull request #19049 from ChayimFriedman2/add-reference-tyLukas Wirth-16/+5
minor: Remove duplicate method from `hir::Type`
2025-01-27Merge pull request #19052 from Veykril/push-yqwutllwwyypLukas Wirth-9/+14
Prioritize formatting thread tasks in main_loop
2025-01-27Prioritize formatting thread tasks in main_loopLukas Wirth-9/+14
2025-01-27Report calling unsafe fn pointer as unsafeChayim Refael Friedman-1/+19
2025-01-27Don't suggest `into_iter().method()` on iteratorsChayim Refael Friedman-1/+36
2025-01-27Remove duplicate method from `hir::Type`Chayim Refael Friedman-16/+5
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-27Merge pull request #19047 from lnicola/rename-highlightLaurențiu Nicola-0/+14
fix: Fix syntactic highlighting for renames
2025-01-27Fix syntactic highlighting for renamesLaurențiu Nicola-0/+14
2025-01-27Merge pull request #19044 from ChayimFriedman2/deprecated-safeLukas Wirth-100/+274
fix: Fix #[rustc_deprecated_safe_2024]
2025-01-27Fix a missing standard token in semantic highlightingChayim Refael Friedman-2/+3
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-27Fix #[rustc_deprecated_safe_2024]Chayim Refael Friedman-100/+274
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-27Remove `has_default` from `FieldId`Shoyu Vanilla-64/+35
2025-01-27Fix a mistake in conditionShoyu Vanilla-2/+1
2025-01-27Add a test for field default value body as defining usage of TAITShoyu Vanilla-27/+141
2025-01-27Implement `HasResolver` and `HasModule` for `FieldId`Shoyu Vanilla-19/+20
2025-01-27Compute diagnostics of a field body iff it has oneShoyu Vanilla-22/+64