Commit graph

278849 commits

Author SHA1 Message Date
Ali Bektas
806ec88963 Revert tests::patterns::infer_pattern
And apply requested changes
2025-02-03 12:23:13 +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
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
Shoyu Vanilla
5ca9f522dd Handle missing fields diagnostics 2025-01-27 19:38:39 +09:00
Shoyu Vanilla
d18afd394c feat: Implement default-field-values 2025-01-27 19:38:35 +09:00
Lukas Wirth
1711a19dbf
Merge pull request #19036 from Veykril/push-nprltlwvryxw
Split out `ExpressionStore` from `Body`
2025-01-27 07:54:44 +00:00
Lukas Wirth
6db1411ae0
Merge pull request #19037 from ChayimFriedman2/fix-other-test
fix: In completion's expand, consider recursion stop condition (when we're not inside a macro call anymore) *after* the recursive call instead of before it
2025-01-27 07:37:27 +00:00
Lukas Wirth
90516478a7
Merge pull request #19038 from ChayimFriedman2/unused-unsafe
feat: Support RFC 2396
2025-01-27 07:36:15 +00:00