-
Notifications
You must be signed in to change notification settings - Fork 14.1k
rust-analyzer subtree update
#149499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-analyzer subtree update
#149499
Conversation
Instead of the hygiene what happens to be in the same fake range.
Because, as it turns out, this is necessary to determine the correct edition (it is not global). The next commits will make use of it.
Example
---
```rust
let arg_list = make::arg_list([make::expr_literal("1").into(), make::expr_literal("2").into()]);
let mut editor = SyntaxEditor::new(arg_list.syntax().clone());
let target_expr = make::expr_literal("3").clone_for_update();
for arg in arg_list.args() {
editor.replace(arg.syntax(), target_expr.syntax());
}
let edit = editor.finish();
let expect = expect![["(3, 3)"]];
expect.assert_eq(&edit.new_root.to_string());
```
**Before this PR**
```text
(, )3
```
**After this PR**
```text
(3, 3)
```
Previously we didn't set the enclosing position on definitions, so SCIP consumers didn't know the position of the entire definition that provides the symbol.
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; ```
Via separate methods. This is both more clear, shorter, and will be required for the next commit.
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.
…-crate-comp Fix complete after `extern`, add `crate` completion
feature: Set enclosing_range field on SCIP output
What a single operator precedence can do :)
fix: Don't run cache priming when disabled in settings
…ken-edition fix: Use per-token, not global, edition in the parser
…hygiene fix: Use root hygiene for speculative resolution
…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.
It tests the opposite of the correct behavior.
fix: Pass the correct per-token (not global) edition when expanding macro_rules
minor: Increase MSRV to 1.91.0
proc-macro-srv: Fix unnecessary subtree wrapping in protocol
…ate-changed Fix syntax_editor duplicated changed element
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
fix Display scope inlay hints after closing brace for more types of blocks rust-lang#18833
…ropdown fix: rust-analyzer.imports.granularity.group should get a dropdown UI
Fix formatting issues in manual
…ctions fix: Rewrite dyn trait lowering to follow rustc
Turns out we're not using it anymore.
internal: Remove the block from `DbInterner`
I missed a ["__0"] to access the str in the Static case. Also, simplify the code to rely on the pretty printer for str rather than accessing data_ptr/length directly. This makes it more robust against changes in str. Output before: "<SmolStr Static error: There is no member named data_ptr.>" Output after: "preferred-width"
gdb pretty printer: fix printing when using Repr::Static
…oss protocol versions
internal: Ensure proc-macro-api version check works with postcard across protocol versions
This updates the rust-version file to dfe1b8c.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: dfe1b8c Filtered ref: d3d1f3831e6b7fa73889d90bc8dd56d22cb80834 Upstream diff: rust-lang/rust@1be6b13...dfe1b8c This merge was created using https://github.com/rust-lang/josh-sync.
minor: Option-box `crate_lang_items` query result
Rustc pull update
minor: Use `Itertools::exactly_one` in a couple more places
|
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
|
@bors r+ p=2 help some proc macro server changes catch the train |
|
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 9b82a4f (parent) -> 2fb8053 (this PR) Test differencesShow 4 test diffs4 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 2fb805367dd3012ce5c50865d03c86e70bf10f0f --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (2fb8053): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 474.873s -> 471.488s (-0.71%) |
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@d690155.Created using https://github.com/rust-lang/josh-sync.
r? @ghost