-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Subtree update of rust-analyzer
#127617
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
Subtree update of rust-analyzer
#127617
Conversation
Use full sentences, and mention how to disable the diagnostic if users are intentionally working on unowned files.
…t are members of a struct or union
Simplify some term search tactics Working on the paper `@phijor` found that "Data constructor" tactic could be simplified quite a bit by running it only in the backwards direction. With n+1 rounds it has same coverage as previous implementation in n rounds, however the tactic it self is more simple and also potentially faster as there is less to do. In a nutshell the idea is to only work with types in the wish-list rather than with any types. Turns out it is quite a bit faster: Before: ``` ripgrep: Tail Expr syntactic hits: 238/1692 (14%) Tail Exprs found: 1223/1692 (72%) Term search avg time: 15ms nalgebra: Tail Expr syntactic hits: 125/3001 (4%) Tail Exprs found: 2143/3001 (71%) Term search avg time: 849ms ``` After ```` ripgrep: Tail Expr syntactic hits: 246/1692 (14%) Tail Exprs found: 1209/1692 (71%) Term search avg time: 8ms nalgebra: Tail Expr syntactic hits: 125/3001 (4%) Tail Exprs found: 2028/3001 (67%) Term search avg time: 305ms ```` _Also removed niche optimization of removing scope defs from the search space as this wasn't helping much anyway and made code a bit more complex._
fix: pattern completions in let-stmt fix rust-lang#17480. We can write `let S { a, b } = s;` or `let Some(x) = a else {}`, so it is reasonable to allow pattern completions in `LetStmt`.
chore: Fix diagnostic name in macro_error.rs
fix: Improve hover text in unlinked file diagnostics Use full sentences, and mention how to disable the diagnostic if users are intentionally working on unowned files.  (Full disclosure: I've tested a rust-analyzer build in VS Code, but the pop-up logic is currently disabled due to rust-lang#17062, so I haven't tested that.)
… r=Veykril fix: don't remove parentheses for calls of function-like pointers that are members of a struct or union Fixes rust-lang#17111
internal: Some more small memory optimizations Not a big impact on metrics, though there are some more savings in queries mainly used by the IDE layer from this
With each `config::apply_change` duplicate configs were being added. Now we first drain the vec that holds these and then start adding.
…=alibektas minor : Fix duplicate snippets showing up on hover. With each `config::apply_change` duplicate configs were being added. Now we first drain the vec that holds these and then start adding. This fixes rust-lang#17485
minro: move tt-iter into tt crate
…ame, r=Veykril feat: add inlay hints for generic parameters fixes rust-lang#11091 By default, only hints for const generic parameters are shown, and this can be configured through `rust-analyzer.inlayHints.genericParameterHints.enable`. Probably needs more testing.
Add `f16` and `f128` support Adds `f16` and `f128` support, using the `rustc_apfloat` library (also used by `rustc`) for parsing/arithmetic/displaying since the types aren't stable yet so can't be used by rust-analyzer itself. Issue: rust-lang#17451
internal: Remove faq landing page, improve main one Having more than one is potentialyl annoying as both will get opened upon install, using walkthroughs for this is not ideal. So this merges the two and also adds a couple tips, fixes rust-lang/rust-analyzer#17569
…ykril feat: do not add new enum if it already exists ## Summary This PR introduces a check for the existence of another enum within the current scope, and if it exist, we skip `add_enum_def`. ## Why? Currently, when using the `bool_to_enum` assist more than once, it is possible to add multiple enum definitions. For example, the following snippet, ```rs #[derive(PartialEq, Eq)] enum Bool { True, False, } fn main() { let a = Bool::True; let b = true; println!("Hello, world!"); } ``` will be transformed into, ```rs #[derive(PartialEq, Eq)] enum Bool { True, False, } #[derive(PartialEq, Eq)] enum Bool { True, False, } fn main() { let a = Bool::True; let b = Bool::True; println!("Hello, world!"); } ``` This can be annoying for users to clean up.
minor: Sync from rust
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 |
CC @Veykril ^ |
@rustbot author |
@bors r+ p=1 subtree update |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a91f7d7): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 700.256s -> 700.14s (-0.02%) |
r? @ghost