Lukas Wirth
500ea05aef
chore: Bump dependencies
2025-03-23 08:46:10 +01:00
Lukas Wirth
d4122434dd
chore: Remove unused dependencies
2025-03-23 08:08:17 +01:00
Felicián Németh
f2ad0fcb21
Speed up resolving "Generate delegate method" assist (part 2)
...
Make it compile by adding a `None` subtype to rest of the AssistId
instantiations.
2025-03-22 09:58:44 +01:00
Felicián Németh
7aa70a86d1
Speed up resolving "Generate delegate method" assist (part 1)
...
Fix #19322
Sometimes there are 185 "Generate delegate" assists with the same
assist_id and asssist_kind. This commit introduces and additional
differentiator: assist_subtype. Therefore, when the LSP client sends
an assist resolve request, rust-analyzer only need to compute edits
for a single assist instead of 185.
2025-03-22 09:41:34 +01:00
Lukas Wirth
3086e5fe90
chore: Remove some unnecessary usage of Semantics
2025-03-21 20:09:03 +01:00
Lukas Wirth
a505420751
chore: Bump Edition::CURRENT
to 2024
2025-03-17 12:29:19 +01:00
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +01:00
Lukas Wirth
220d913cbc
Merge pull request #19366 from Veykril/push-mkunlxkysssr
...
chore: Remove legacy `SyntaxContextId` re-export
2025-03-15 16:25:13 +00:00
Lukas Wirth
02a793bd59
chore: Remove legacy SyntaxContextId
re-export
2025-03-15 17:09:17 +01:00
Lukas Wirth
faf2bdde5f
Merge pull request #19356 from flodiebold/push-snpyvwuulkmw
...
fix: Avoid recursively debug printing crates
2025-03-14 18:19:05 +00:00
Florian Diebold
c1102ac703
Avoid recursively debug printing crates
2025-03-14 19:02:06 +01:00
Lukas Wirth
2ea09b2e47
Split variant_data
into its own query
2025-03-14 14:16:33 +01:00
Lukas Wirth
12f54eec27
Split assoc items out of trait_data
/impl_data
queries
2025-03-14 13:31:41 +01:00
Chayim Refael Friedman
c94e9efbef
Salsify the crate graph
...
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
2025-03-12 21:02:30 +02:00
David Barsky
74620e64ec
internal: port rust-analyzer to new Salsa
2025-03-10 13:30:51 -04:00
Lukas Wirth
f81fcabdf9
Merge pull request #19332 from Veykril/push-trvznlqsvtyq
...
Make change annotations per text-edit
2025-03-10 11:25:13 +00:00
Lukas Wirth
70066399f0
Make change annotations per text-edit
2025-03-10 12:08:42 +01:00
Laurențiu Nicola
be48993351
Merge pull request #19331 from lnicola/sync-from-rust
...
minor: Sync from downstream
2025-03-10 09:52:17 +00:00
Lukas Wirth
27a5b1ba0c
Merge pull request #19330 from ChayimFriedman2/normalize-projection
...
fix: Normalize projections in evaluated const display and layout calculation
2025-03-10 09:15:35 +00:00
Laurențiu Nicola
363590b450
Merge from rust-lang/rust
2025-03-10 10:41:53 +02:00
Chayim Refael Friedman
62e7d2851b
Warn the user when a rename will change the meaning of the program
...
Specifically, when a rename of a local will change some code that refers it to refer another local, or some code that refer another local to refer to it.
We do it by introducing a dummy edit with an annotation. I'm not a fond of this approach, but I don't think LSP has a better way.
2025-03-06 21:07:10 +02:00
Chayim Refael Friedman
2fc0dc0f13
Pass the target crate in HirFormatter
...
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-03-06 21:00:05 +02:00
许杰友 Jieyou Xu (Joe)
905ddf8cd8
Rollup merge of #137728 - Darksonn:no-tuple-unsize, r=oli-obk
...
Remove unsizing coercions for tuples
See https://github.com/rust-lang/rust/issues/42877#issuecomment-2686010847 and below comments for justification.
Tracking issue: #42877
Fixes : #135217
2025-03-05 21:46:44 +08:00
Lukas Wirth
27dc614627
Merge pull request #19274 from Veykril/push-pouwrwwrlrlt
...
Highlight unsafe operations as unsafe, not definitions
2025-03-05 12:57:25 +00:00
Lukas Wirth
9fc0ffe008
Use HIR unsafety information for unsafe syntax highlightng
2025-03-05 13:18:46 +01:00
Thalia Archibald
0811ca0a61
Use size_of from the prelude instead of imported
...
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.
These functions were added to all preludes in Rust 1.80.
2025-03-05 00:48:44 -08:00
Lukas Wirth
9200f77068
More precise macro modifiers for syntax highlighting
2025-03-01 17:23:51 +01:00
BenjaminBrienen
b19ef6b046
fix doc tests
2025-02-27 14:58:46 +01:00
BenjaminBrienen
bd7375a58f
enable doctest
2025-02-27 14:58:46 +01:00
Alice Ryhl
4d0c1ee1bd
Delete tuple unsizing
2025-02-27 10:26:33 +00:00
Lukas Wirth
0b2e8166a1
Remove limit
crate in favor usize
2025-02-23 17:35:09 +01:00
Laurențiu Nicola
bec6d6fbe3
Merge from rust-lang/rust
2025-02-17 13:20:12 +02:00
Nicholas Nethercote
610f4c4046
Rename pattern_complexity
attr as pattern_complexity_limit
.
...
For consistency with `recursion_limit`, `move_size_limit`, and
`type_length_limit`.
2025-02-17 09:30:40 +11:00
Lukas Wirth
e0814742f0
fix: Do not show safety hints for extern items lacking semantics
2025-02-12 14:43:51 +01:00
Lukas Wirth
ab5e821d97
Expose symbol of CrateName
2025-02-04 14:38:58 +01:00
Lukas Wirth
b32ddea521
Split cache priming into distinct phases
2025-02-03 10:47:53 +01:00
David Barsky
bc10a44798
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
Lukas Wirth
07a09c154e
Merge pull request #19015 from Wilfred/mdbook
...
manual: Convert to mdbook
2025-01-28 16:19:37 +00:00
David Barsky
be3307450f
Back out "feat: Implement default-field-values
"
...
This backs out commit 7de0b2e75a541b98f735ee6fcd12d326be38d23f.
2025-01-27 17:30:35 -05:00
Shoyu Vanilla
7de0b2e75a
feat: Implement default-field-values
2025-01-27 19:38:35 +09:00
Lukas Wirth
3bb0ff3480
Add GenericDefId::StaticId
2025-01-26 11:07:54 +01:00
Lukas Wirth
5df0b592c1
Merge pull request #19028 from Veykril/push-vuytpkvqzwzs
...
fix: Fix flyimport not filtering via stability of import path
2025-01-25 11:34:36 +00:00
Lukas Wirth
b31f53e0d6
Fix flyimport not filtering via stability of import path
2025-01-25 12:18:54 +01:00
Lukas Wirth
fbf3d08a30
Merge pull request #19026 from Veykril/push-wrxrutptywzx
...
Only collect implicit visibile use symbols if they have renames
2025-01-25 10:27:26 +00:00
Lukas Wirth
7acf8dcf7b
Only collect implicit visibile use symbols if they have renames
...
Otherwise this will pollute the index too much with unnecessary symbols
2025-01-25 11:12:06 +01:00
Wilfred Hughes
deda58e8f1
manual: Convert to mdbook
...
Split manual.adoc into markdown files, one for each chapter.
For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.
For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.
See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.
This change is based on #15795 , but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
2025-01-24 13:23:22 -08:00
Wilfred Hughes
4c34352517
minor: Suggest better names when a type is a sequence
...
Previously, we'd suggest a type of `vec` for a value of type `Vec<T>`,
which is rarely what the user wants. We also had no suggestions for
values of type `&[T]`.
Instead, try to pluralise the inner type name, and fall back to
`items`.
2025-01-24 11:30:19 -08:00
Lukas Wirth
93de80d833
Merge pull request #19016 from Veykril/push-moqnsytyrupu
...
fix: Fix `ItemScope` not recording glob imports
2025-01-24 13:25:39 +00:00
Lukas Wirth
3b88a2f134
Fix ItemScope
not recording glob imports
...
This caused us other code to incorrectly assume in dealing with a declaration when in fact it was dealing with a glob imported definition
2025-01-24 14:11:45 +01:00
Lukas Wirth
2c040c03cf
Merge pull request #18986 from Veykril/push-zlwvwlowpzqm
...
Goto `Display::fmt` when invoked on `to_string`
2025-01-21 09:25:05 +00:00