-
Notifications
You must be signed in to change notification settings - Fork 14.1k
rust-analyzer subtree update
#149497
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
Closed
Closed
rust-analyzer subtree update
#149497
+7,530
−5,529
Conversation
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
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
Re-introduce attribute rewrite
Turns out, we need to elaborate supertrait projections, and the logic isn't trivial either!
internal: New style salsa infer query
…feature fix: Support multiple `enable` in `#[target_feature]`
…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
Collaborator
|
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 |
Member
Author
|
@bors r+ p=2 help some proc macro server changes catch the train |
Collaborator
Member
Author
|
@bors r- |
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
T-rust-analyzer
Relevant to the rust-analyzer team, which will review and decide on the PR/issue.
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@d646b23.Created using https://github.com/rust-lang/josh-sync.
r? @ghost