Lukas Wirth
9c9c245d61
Merge pull request #21169 from Veykril/push-psyltyvxtpoz
...
internal: New style salsa infer query
2025-11-29 19:11:24 +00:00
Lukas Wirth
e78e835951
Slim down tuple_field_access_types
2025-11-29 20:01:53 +01:00
Lukas Wirth
70b3c3559f
internal: New style salsa infer query
2025-11-29 19:43:52 +01:00
Chayim Refael Friedman
645e490640
Merge pull request #20892 from ChayimFriedman2/better-attrs
...
Re-introduce attribute rewrite
2025-11-29 17:02:17 +00:00
Chayim Refael Friedman
bf75855cb3
Fix a panic where all_crates() is empty
2025-11-29 18:52:18 +02:00
Chayim Refael Friedman
4b29847544
Make Semantics::attach_first_edition() not return Option
...
And instead call `EditionedFileId::current_edition_guess_origin`, as most callers do it anyway.
2025-11-29 18:52:18 +02:00
Chayim Refael Friedman
341f1df463
Fix input censoring for attr macros when the input contains a key = value attr
...
It caused the attribute macro to not be removed, causing it to be expanded again and again.
I don't know how to test this, as it's hard to test that the recursion limit was reached.
2025-11-29 18:52:18 +02:00
Chayim Refael Friedman
bf8b351a53
Fix bug with attribute macro expansion
...
See the comment in the code. Previously it wasn't present because we were'nt stripping derives appearing before attribute macros, so we kept the derive and therefore the helper resolved as well. But we should strip the derives, as rustc does.
2025-11-29 18:52:18 +02:00
Chayim Refael Friedman
a10ce57b2b
Rewrite attribute handling
...
Basically, we switch to expanding cfg_attr in AST form, filter irrelevant attributes from the item tree, and move hir-def attributes (non-item-tree) to be flag-based.
The main motivation is memory usage, although this also simplifies the code, and fixes some bugs around handling of `cfg_attr`s.
2025-11-29 18:52:18 +02:00
Chayim Refael Friedman
bc662f19bb
Merge pull request #21149 from ChayimFriedman2/lang-items
...
perf: Use one query per crate for lang items, not one per lang item
2025-11-29 16:19:38 +00:00
Laurențiu Nicola
5dbb37634a
Merge pull request #21161 from itsjunetime/no_default_force_always_assert
...
Remove force-always-assert from xtask/install install_cmd as well
2025-11-29 14:55:20 +00:00
Laurențiu Nicola
86e15292fe
Merge pull request #21160 from Wilfred/clarify_process_naming
...
minor: Clarify generic (not just cargo) process handling
2025-11-29 14:31:38 +00:00
Lukas Wirth
97a427c984
Merge pull request #21167 from Veykril/push-xksxokxxwyqw
...
perf: Shrink `InferenceResult` by ~40 bytes
2025-11-29 11:01:40 +00:00
Lukas Wirth
da79a562a7
Replace incorrect ArenaMap use with FxHashMap
2025-11-29 11:51:32 +01:00
Lukas Wirth
3148a4a46c
perf: Shrink InferenceResult by ~40 bytes
2025-11-29 11:47:30 +01:00
Wilfred Hughes
90d758036e
Clarify generic (not just cargo) process handling
...
rust-analyzer supports custom discover commands, so child processes
are not necessarily `cargo` any more.
Update the doc comments and type names to reflect this.
2025-11-28 15:40:25 +00:00
itsjunetime
a8d88475f1
Remove force-always-assert from xtask/install install_cmd as well
2025-11-28 08:18:13 -06:00
Chayim Refael Friedman
e07aa92ffa
Merge pull request #21156 from Wilfred/manual_formatting
...
Fix formatting issues in manual
2025-11-28 11:51:16 +00:00
Wilfred Hughes
3d33e8f872
Fix URLs and highlighting in manual
2025-11-28 11:39:40 +00:00
Chayim Refael Friedman
81cff93d08
Merge pull request #21147 from Wilfred/imports_granularity_dropdown
...
fix: rust-analyzer.imports.granularity.group should get a dropdown UI
2025-11-28 11:30:53 +00:00
Chayim Refael Friedman
d31e27fbe6
Merge pull request #21077 from asukaminato0721/18833
...
fix Display scope inlay hints after closing brace for more types of blocks #18833
2025-11-28 11:29:33 +00:00
Wilfred Hughes
0b725f399f
fix: rust-analyzer.imports.granularity.group should get a dropdown UI
...
VS Code only offers a dropdown if a the toplevel property description
is `enum`. For `anyOf` (a JSON schema feature), we don't get that
helpful UI.
Whilst the previous version marked `preserve` as deprecated, the VS
Code UI didn't do anything special when users chose that value.
Instead, use an enum so we get the helpful dropdown, and just use the
description to highlight the deprecated value.
Relevant docs:
https://code.visualstudio.com/api/references/contribution-points#:~:text=The%20enumDescriptions%20property%20provides%20a,will%20be%20parsed%20as%20Markdown .
https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.2.1.2
2025-11-28 11:01:57 +00:00
Shoyu Vanilla (Flint)
0362682e50
Merge pull request #21023 from A4-Tacks/syntax-editor-duplicate-changed
...
Fix syntax_editor duplicated changed element
2025-11-28 10:48:45 +00:00
Asuka Minato
170d9b4a82
fix Display scope inlay hints after closing brace for more types of blocks
2025-11-28 19:44:24 +09:00
Lukas Wirth
6088208d7f
Merge pull request #21154 from Veykril/push-nvlktkknrqms
...
proc-macro-srv: Fix unnecessary subtree wrapping in protocol
2025-11-28 10:42:41 +00:00
Lukas Wirth
8610ebbc1d
proc-macro-srv: Fix unnecessary subtree wrapping in protocol
2025-11-28 11:32:35 +01:00
Chayim Refael Friedman
e31e2b1e2c
Merge pull request #21153 from ChayimFriedman2/msrv
...
minor: Increase MSRV to 1.91.0
2025-11-28 10:09:31 +00:00
Chayim Refael Friedman
b24f9b6531
Increase MSRV to 1.91.0
2025-11-28 11:59:40 +02:00
Chayim Refael Friedman
6c80657ae5
Merge pull request #20164 from ChayimFriedman2/fix-edition
...
fix: Pass the correct per-token (not global) edition when expanding macro_rules
2025-11-28 08:39:44 +00:00
Chayim Refael Friedman
a63a9441f0
Remove an incorrect test
...
It tests the opposite of the correct behavior.
2025-11-28 10:30:13 +02:00
Chayim Refael Friedman
ebda376545
Pass the correct per-token (not global) edition when expanding macro_rules
...
This was hard to do because of the separation between `mbe` and `hir-expand`, but became possible by the Salsa migration, as now `SyntaxContext` doesn't require `ExpandDatabase`, `salsa::Database` is enough.
2025-11-28 10:30:10 +02:00
Lukas Wirth
3e420122c5
Merge pull request #20217 from ChayimFriedman2/spec-resolve-hygiene
...
fix: Use root hygiene for speculative resolution
2025-11-28 08:13:06 +00:00
Lukas Wirth
83c188aa74
Merge pull request #20163 from ChayimFriedman2/parser-per-token-edition
...
fix: Use per-token, not global, edition in the parser
2025-11-28 08:11:38 +00:00
Shoyu Vanilla (Flint)
450860ae40
Merge pull request #21151 from ChayimFriedman2/no-cache-prime
...
fix: Don't run cache priming when disabled in settings
2025-11-28 04:37:16 +00:00
Chayim Refael Friedman
f7be6355ab
Don't run cache priming when disabled in settings
...
What a single operator precedence can do :)
2025-11-28 06:26:13 +02:00
Chayim Refael Friedman
74e9798d7f
Merge pull request #21141 from Wilfred/scip_enclosing_range
...
feature: Set enclosing_range field on SCIP output
2025-11-28 03:09:50 +00:00
Chayim Refael Friedman
a68be9cbbe
Merge pull request #21144 from A4-Tacks/abi-qualifier-extern-crate-comp
...
Fix complete after `extern`, add `crate` completion
2025-11-28 03:07:40 +00:00
Chayim Refael Friedman
f2a08a2144
Use one query per crate for lang items, not one per lang item
...
Lang items rarely change, so putting a query for each doesn't give us anything. On the other hand, putting them behind only one query not only saves memory, it also has a giant benefit: we can store the struct with all lang items in the interner, making access to them very cheap. That basically means that anything in the hot path can avoid a *very common* query, and exchange it for a simple field access.
2025-11-28 03:28:44 +02:00
Chayim Refael Friedman
01630f3595
Separate between creating an interner without crate and with crate
...
Via separate methods.
This is both more clear, shorter, and will be required for the next commit.
2025-11-28 00:04:24 +02:00
Lukas Wirth
ac118f93ff
Merge pull request #21146 from Veykril/push-kwupvlsnstrx
...
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl rendering puncts as u8
2025-11-27 15:59:08 +00:00
Lukas Wirth
6bbdb1f6ae
proc-macro-srv: Fix <TokenStream as Display>::fmt impl rendering puncts as u8
2025-11-27 16:49:38 +01:00
Lukas Wirth
7f93ba5612
Merge pull request #21145 from Veykril/push-prwwrlwmoxzx
...
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl producing trailing whitespace
2025-11-27 13:01:10 +00:00
Lukas Wirth
2578d40f34
proc-macro-srv: Fix <TokenStream as Display>::fmt impl producing trailing whitespace
2025-11-27 13:51:20 +01:00
Lukas Wirth
41a2df5b38
Merge pull request #21095 from A4-Tacks/autoderef-skipiter
...
Fix skipiter not applicable in autoderef
2025-11-27 08:31:19 +00:00
Shoyu Vanilla (Flint)
32555af6a2
Merge pull request #20976 from A4-Tacks/comp-after-top-inner-attr
...
Fix not complete after inner-attr in source-file
2025-11-27 06:36:13 +00:00
Shoyu Vanilla (Flint)
e958534bfe
Merge pull request #21028 from A4-Tacks/comp-pattern-alias
...
Fix not complete type alias in pattern
2025-11-27 06:06:53 +00:00
Shoyu Vanilla (Flint)
b8191e675f
Merge pull request #20685 from A4-Tacks/enum-multi-gen-is-as
...
Add multiple generate for enum generate is, as, try_into
2025-11-27 06:05:55 +00:00
A4-Tacks
16a9a55d88
Fix complete after extern, add crate completion
...
Example
---
```rust
extern "C" $0
```
**Before this PR**
Can't be completion
**After this PR**
```text
kw async
kw const
kw enum
kw fn
kw impl
kw impl for
kw mod
kw pub
kw pub(crate)
kw pub(super)
kw static
kw struct
kw trait
kw type
kw union
kw unsafe
kw use
```
---
```rust
extern $0
```
**Before this PR**
Can't be completion
**After this PR**
```rust
extern crate $0;
```
2025-11-27 13:40:42 +08:00
Laurențiu Nicola
a60d5fa0c1
Merge pull request #21143 from rust-lang/rustc-pull
...
minor: sync from downstream
2025-11-27 05:34:29 +00:00
The rustc-josh-sync Cronjob Bot
fc4db45047
Merge ref '1be6b13be73d' from rust-lang/rust
...
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: 1be6b13be7
Filtered ref: 53d2132341f509072e83b49d4d82f17465ab164c
Upstream diff: https://github.com/rust-lang/rust/compare/6159a44067ebce42b38f062cc7df267a1348e092...1be6b13be73dc12e98e51b403add4c41a0b77759
This merge was created using https://github.com/rust-lang/josh-sync .
2025-11-27 04:08:49 +00:00