Repository navigation
rust-analyzer subtree update - #165338
Merged
Merged
rust-analyzer subtree update#165338
rust-analyzer subtree update#165338Conversation
It saves memory by being only one machine word inline and compact (no extra capacity) outline, while also being even faster if the length is commonly small because linear search is faster for small lengths. When measuring `analysis-stats`, this saves 40mb on self, 77mb on buck2 and 142mb on omicron. It's also *faster*: 3ginstructions saved on self and buck2, and 30ginstructions on omicron (walltime is too noisy). The memory effect is also likely to appear in IDE scenarios almost as well, because a major part is def maps, and I speculate that unnamed consts also play a role (because the amount of almost-empty expression stores seem too high for real bodies). Not all maps were changed to use this, only those that measurements show are commonly small. The threshold was at least ~95% of the maps of this kind fitting into the thin schema (that is, have at most 10 elements). I also switched some `IndexMap`s to `HashMap`s where I believe the order does not matter.
Complete `&val` in `foo(*$0)` -> `*&val` is strange and almost useless
Example
---
```rust
struct S;
fn foo(s: S) {}
fn main() {
let val = S;
let valref = &S;
let valmut = &mut S;
foo(*$0);
}
```
**Before this PR**
```text
lc valmut &mut S [type+local]
lc valref &S [type+local]
ex valref [type]
st S S []
st &S [type]
lc val S [local]
lc &val [type+local]
st S S []
```
**After this PR**
```text
lc valmut &mut S [type+local]
lc valref &S [type+local]
ex valref [type]
st S S []
lc val S [local]
st S S []
```
Bump notify to 8.2.1
minor: do not convert empty json-object
Previously we errored when computing diagnostics on Rust
programs that contain unresolved projection types. This occurred in
LSP sessions even if users hadn't enabled term search features.
In term search, `LookupTable::find()` checks each type using
`could_unify_with_deeply()` as an equality predicate.
However, `LookupTable::insert()` calls `ty.instantiate_with_errors()`,
and deep unification uses a fresh type variable for each `{error}`
type. We end up trying to unify `<?0 as Tr>::A` with `<?1 as Tr>::A`
and we don't manage to find the type that we previously inserted.
Instead, look for the exact value in the lookup table first, and only
iterate the types with `could_unify_with_deeply()` afterwards.
Without this, we hit the `.expect("Expr not in lookup")` in
`term_search::tactics::struct_projection()`.
AI disclosure: Code partly written by GPT-5.6 Sol, commit message and
review by me. No rustc citation because AFAIK there's no term search
in rustc.
…ction-lookup-panic fix: Panic `Expr not in lookup` due to projection types
Because we're going to also add `IdentKind::ForcedKeyword`. And also rename `Ident::is_raw` to `Ident::kind`.
Except in the proc macro server serialization code, since that code is not in a good shape yet.
..and get the error ty from `default_types` instead.
internal: remove `InferenceResult.error_ty`
Update generated lints and target features
fix: no suggest reference after dereferences
The code comes from rustc, and there, the FIXME was referring to the removal of `ExtractIf` in favor of `.extract_if()` -- rustc has removed the FIXME after switching to `.extract_if()`[^1]. But it looks like r-a has been using the correct API from the start, which makes this FIXME moot. [^1]: rust-lang@39f7cdb
internal: remove outdated FIXME
…-lexer feat: Upgrade rustc_lexer and handle forced keywords (`k#`)
Update generated lints and target features
This updates the rust-version file to 92ffebe.
Lex and parse emoji in lifetimes, and disallow them in the parser with a hard error. Allow emoji to start a lifetime name even if they are not XID_Start. ``` error: lifetimes cannot contain emoji --> $DIR/emoji-in-lifetime.rs:1:22 | LL | fn bad_lifetime_name<'🐛🐛🐛family👨👩👧👦>( | ^^^^^^^^^^^^^^^^^^^^^ ``` Unify lifetime and identifier parsing. Use `bad_unicode_identifiers` for lifetimes.
Rustc pull update
internal: Use macOS 15 runners and bump deployment target
Update master to latest rowan
It's expected to have type `Poll<Option<T>>`, so we have to use a little helper. rustc source: https://github.com/rust-lang/rust/blob/f01f1dda4a792e18fe1a2ae6a5f205cc2b9d3c97/compiler/rustc_ast_lowering/src/expr.rs#L1735-L1760.
Synced from r-l/r plus another test.
fix: Fix lowering of `yield` in `async gen`
minor: Fix flaky `NamedTempFile` test
perf: Provide `ThinMap`, a map that uses `ThinVec` when the length is small
minor: Pin `unicode-{ident, properties}` crates to fix autopublish workflow
This updates the rust-version file to 4c46afa.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@4c46afa Filtered ref: rust-lang/rust-analyzer@393b22e Upstream diff: rust-lang/rust@92ffebe...4c46afa This merge was created using https://github.com/rust-lang/josh-sync.
minor: sync from downstream
Collaborator
|
cc @rust-lang/rust-analyzer |
Member
Author
|
@bors r+ rollup |
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Nov 2, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@0a0200f. Created using https://github.com/rust-lang/josh-sync. r? @ghost
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
Rollup of 15 pull requests Successful merges: - #165271 (Re-enable most of `test-aarch64-apple-macos-26-2`) - #165331 (miri subtree update) - #165211 (Streamline function_item_references lint) - #165273 (Add some docs for our allocator `unstable_feature_bound`s) - #165279 (explicitly test the win32 symbol byte count suffix) - #162688 (Fix invalid suggestions and misleading notes for imports) - #165198 (expand the docs of `Complex<T>`) - #165231 (Remove redundant parameter from `AttributeParser::parse_attribute_list()` & `AttributeParser::parse_single_args()`) - #165248 (add {Receiver,Sender,SyncSender}::{is_empty,len}) - #165284 (Ensure the display impl of uXX is small with optimize_for_size) - #165287 (Add example of implementing Allocator to its docs) - #165297 (Cleanup `rustdoc-html` tests) - #165298 (Improve diagnostics for notable-trait color arguments) - #165336 (Refactor `analyze_attr` to use a match) - #165338 (`rust-analyzer` subtree update)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
Rollup of 15 pull requests Successful merges: - #165271 (Re-enable most of `test-aarch64-apple-macos-26-2`) - #165331 (miri subtree update) - #165211 (Streamline function_item_references lint) - #165273 (Add some docs for our allocator `unstable_feature_bound`s) - #165279 (explicitly test the win32 symbol byte count suffix) - #162688 (Fix invalid suggestions and misleading notes for imports) - #165198 (expand the docs of `Complex<T>`) - #165231 (Remove redundant parameter from `AttributeParser::parse_attribute_list()` & `AttributeParser::parse_single_args()`) - #165248 (add {Receiver,Sender,SyncSender}::{is_empty,len}) - #165284 (Ensure the display impl of uXX is small with optimize_for_size) - #165287 (Add example of implementing Allocator to its docs) - #165297 (Cleanup `rustdoc-html` tests) - #165298 (Improve diagnostics for notable-trait color arguments) - #165336 (Refactor `analyze_attr` to use a match) - #165338 (`rust-analyzer` subtree update)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
…uwer Rollup of 14 pull requests Successful merges: - #165271 (Re-enable most of `test-aarch64-apple-macos-26-2`) - #165211 (Streamline function_item_references lint) - #165273 (Add some docs for our allocator `unstable_feature_bound`s) - #165279 (explicitly test the win32 symbol byte count suffix) - #162688 (Fix invalid suggestions and misleading notes for imports) - #165198 (expand the docs of `Complex<T>`) - #165231 (Remove redundant parameter from `AttributeParser::parse_attribute_list()` & `AttributeParser::parse_single_args()`) - #165248 (add {Receiver,Sender,SyncSender}::{is_empty,len}) - #165284 (Ensure the display impl of uXX is small with optimize_for_size) - #165287 (Add example of implementing Allocator to its docs) - #165297 (Cleanup `rustdoc-html` tests) - #165298 (Improve diagnostics for notable-trait color arguments) - #165336 (Refactor `analyze_attr` to use a match) - #165338 (`rust-analyzer` subtree update)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
Rollup merge of #165338 - lnicola:sync-from-ra, r=lnicola `rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@0a0200f. Created using https://github.com/rust-lang/josh-sync. r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@0a0200f.Created using https://github.com/rust-lang/josh-sync.
r? @ghost