-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
#129733
Subtree update of rust-analyzer
#129733
Commits on Aug 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c1245e1 - Browse repository at this point
Copy the full SHA c1245e1View commit details
Commits on Aug 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 662f02f - Browse repository at this point
Copy the full SHA 662f02fView commit details
Commits on Aug 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for aa6e8d3 - Browse repository at this point
Copy the full SHA aa6e8d3View commit details
Commits on Aug 13, 2024
-
docs: Add a doc comment for OpQueue
Add an explanatory sentence and some sample code to help readers understand why this struct exists.
Configuration menu - View commit details
-
Copy full SHA for 5e058db - Browse repository at this point
Copy the full SHA 5e058dbView commit details
Commits on Aug 14, 2024
-
Auto merge of rust-lang#17885 - Wilfred:op_queue_docs, r=lnicola
minor: Add a doc comment for OpQueue Add an explanatory sentence and some sample code to help readers understand why this struct exists.
Configuration menu - View commit details
-
Copy full SHA for 54ecca0 - Browse repository at this point
Copy the full SHA 54ecca0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a14155 - Browse repository at this point
Copy the full SHA 4a14155View commit details -
Auto merge of rust-lang#17891 - lnicola:binop-bad-lang-items, r=flodi…
…ebold internal: Be more resilient to bad language item definitions in binop inference Fixes rust-lang#16287 Fixes rust-lang#16286 There's one more in `write_fn_trait_method_resolution`, but I'm not sure if it won't cause further problems in `infer_closures`.
Configuration menu - View commit details
-
Copy full SHA for e2f2e73 - Browse repository at this point
Copy the full SHA e2f2e73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81b68b2 - Browse repository at this point
Copy the full SHA 81b68b2View commit details -
Auto merge of rust-lang#17882 - ShoyuVanilla:issue-17866, r=lnicola
fix: Panic while canonicalizing erroneous projection type Fixes rust-lang#17866 The root cause of rust-lang#17866 is quite horrifyng 😨 ```rust trait T { type A; } type Foo = <S as T>::A; // note that S isn't defined fn main() { Foo {} } ``` While inferencing alias type `Foo = <S as T>::A`; https://github.com/rust-lang/rust-analyzer/blob/78c2bdce860dbd996a8083224d01a96660dd6a15/crates/hir-ty/src/infer.rs#L1388-L1398 the error type `S` in it is substituted by inference var in L1396 above as below; https://github.com/rust-lang/rust-analyzer/blob/78c2bdce860dbd996a8083224d01a96660dd6a15/crates/hir-ty/src/infer/unify.rs#L866-L869 This new inference var's index is `1`, as the type inferecing procedure here previously inserted another inference var into same `InferenceTable`. But after that, the projection type made from the above then passed to the following function; https://github.com/rust-lang/rust-analyzer/blob/78c2bdce860dbd996a8083224d01a96660dd6a15/crates/hir-ty/src/traits.rs#L88-L96 here, a whole new `InferenceTable` is made, without any inference var and in the L94, this table calls; https://github.com/rust-lang/rust-analyzer/blob/78c2bdce860dbd996a8083224d01a96660dd6a15/crates/hir-ty/src/infer/unify.rs#L364-L370 And while registering `AliasEq` `obligation`, this obligation contains inference var `?1` made from the previous table, but this table has only one inference var `?0` made at L365. So, the chalk panics when we try to canonicalize that obligation to register it, because the obligation contains an inference var `?1` that the canonicalizing table doesn't have. Currently, we are calling `InferenceTable::new()` to do some normalizing, unifying or coercing things to some targets that might contain inference var that the new table doesn't have. I think that this is quite dangerous footgun because the inference var is just an index that does not contain the information which table does it made from, so sometimes this "foreign" index might cause panic like this case, or point at the wrong variable. This PR mitigates such behaviour simply by inserting sufficient number of inference vars to new table to avoid such problem. This strategy doesn't harm current r-a's intention because the inference vars that passed into new tables are just "unresolved" variables in current r-a, so this is just making sure that such "unresolved" variables exist in the new table
Configuration menu - View commit details
-
Copy full SHA for 89cd585 - Browse repository at this point
Copy the full SHA 89cd585View commit details
Commits on Aug 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b0183f8 - Browse repository at this point
Copy the full SHA b0183f8View commit details -
Auto merge of rust-lang#17893 - ShoyuVanilla:issue-17871, r=flodiebold
fix: Panic while hovering associated function with type annotation on generic param that not inherited from its container type Fixes rust-lang#17871 We call `generic_args_sans_defaults` here; https://github.com/rust-lang/rust-analyzer/blob/64a140527b383e3a2fe95908881624fc5374c60c/crates/hir-ty/src/display.rs#L1021-L1034 but the following substitution inside that function panic in rust-lang#17871; https://github.com/rust-lang/rust-analyzer/blob/64a140527b383e3a2fe95908881624fc5374c60c/crates/hir-ty/src/display.rs#L1468 it's because the `Binders.binder` inside `default_parameters` has a same length with the generics of the function we are hovering on, but the generics of it is split into two, `fn_params` and `parent_params`. Because of this, it may panic if the function has one or more default parameters and both `fn_params` and `parent_params` are non-empty, like the case in the title of this PR. So, we must call `generic_args_sans_default` first and then split it into `fn_params` and `parent_params`
Configuration menu - View commit details
-
Copy full SHA for e20180d - Browse repository at this point
Copy the full SHA e20180dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a783e30 - Browse repository at this point
Copy the full SHA a783e30View commit details -
Auto merge of rust-lang#17896 - Veykril:editioned-syntax-kinds, r=Vey…
…kril internal: Properly check the edition for edition dependent syntax kinds This puts the current edition in a bunch of places, most of which I annoted with FIXMEs asside from the ones in ide-assists because I couldnt bother with those
Configuration menu - View commit details
-
Copy full SHA for a594a2d - Browse repository at this point
Copy the full SHA a594a2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf4d31d - Browse repository at this point
Copy the full SHA bf4d31dView commit details -
Allow flycheck process to exit gracefully
Assuming it isn't cancelled. Closes rust-lang#17902. The only place CommandHandle::join is used is when the flycheck command finishes, so this commit changes the behavior of the method itself.
Configuration menu - View commit details
-
Copy full SHA for 23c8dcd - Browse repository at this point
Copy the full SHA 23c8dcdView commit details
Commits on Aug 16, 2024
-
Replace once_cell with std's recently stabilized OnceCell/Lock and La…
…zyCell/Lock This doesn't get rid of the once_cell dependency, unfortunately, since we have dependencies that use it, but it's a nice to do cleanup. And when our deps will eventually get rid of once_cell we will get rid of it for free.
Configuration menu - View commit details
-
Copy full SHA for 642a0f8 - Browse repository at this point
Copy the full SHA 642a0f8View commit details -
Test for word boundary in
FindUsages
This speeds up short identifiers search significantly, while unlikely to have an effect on long identifiers (the analysis takes much longer than some character comparison). Tested by finding all references to `eq()` (from `PartialEq`) in the rust-analyzer repo. Total time went down from 100s to 10s (a 10x reduction!).
Configuration menu - View commit details
-
Copy full SHA for 0cbf6a7 - Browse repository at this point
Copy the full SHA 0cbf6a7View commit details -
Auto merge of rust-lang#17907 - ChayimFriedman2:no-once_cell, r=Veykril
internal: Replace once_cell with std's recently stabilized OnceCell/Lock and LazyCell/Lock This doesn't get rid of the once_cell dependency, unfortunately, since we have dependencies that use it, but it's a nice to do cleanup. And when our deps will eventually get rid of once_cell we will get rid of it for free.
Configuration menu - View commit details
-
Copy full SHA for b68992a - Browse repository at this point
Copy the full SHA b68992aView commit details -
Auto merge of rust-lang#17908 - ChayimFriedman2:usages-word-boundarie…
…s, r=Veykril Test for word boundary in `FindUsages` This speeds up short identifiers search significantly, while unlikely to have an effect on long identifiers (the analysis takes much longer than some character comparison). Tested by finding all references to `eq()` (from `PartialEq`) in the rust-analyzer repo. Total time went down from 100s to 10s (a 10x reduction!). Feel free to close this if you consider this a non-issue, as most short identifiers are local.
Configuration menu - View commit details
-
Copy full SHA for 95f5e4b - Browse repository at this point
Copy the full SHA 95f5e4bView commit details -
Auto merge of rust-lang#17903 - tmandry:graceful-exit, r=Veykril
Allow flycheck process to exit gracefully Assuming it isn't cancelled. Closes rust-lang#17902. The only place CommandHandle::join() is used is when the flycheck command finishes, so this commit changes the behavior of the method itself. The only reason I can see for the existing behavior is if the command is somehow holding onto a build lock longer than it should, this would force it to be released. But it would be a pretty heavy-handed way to solve that issue. I'm not aware of this occurring in practice.
Configuration menu - View commit details
-
Copy full SHA for fdd5294 - Browse repository at this point
Copy the full SHA fdd5294View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ca597a - Browse repository at this point
Copy the full SHA 4ca597aView commit details -
Auto merge of rust-lang#17595 - dfireBird:infer-lt, r=flodiebold
Implement lifetime inferring
Configuration menu - View commit details
-
Copy full SHA for 2071778 - Browse repository at this point
Copy the full SHA 2071778View commit details -
Properly account for editions in names
This PR touches a lot of parts. But the main changes are changing `hir_expand::Name` to be raw edition-dependently and only when necessary (unrelated to how the user originally wrote the identifier), and changing `is_keyword()` and `is_raw_identifier()` to be edition-aware (this was done in rust-lang#17896, but the FIXMEs were fixed here). It is possible that I missed some cases, but most IDE parts should properly escape (or not escape) identifiers now. The rules of thumb are: - If we show the identifier to the user, its rawness should be determined by the edition of the edited crate. This is nice for IDE features, but really important for changes we insert to the source code. - For tests, I chose `Edition::CURRENT` (so we only have to (maybe) update tests when an edition becomes stable, to avoid churn). - For debugging tools (helper methods and logs), I used `Edition::LATEST`.
Configuration menu - View commit details
-
Copy full SHA for 3d6129d - Browse repository at this point
Copy the full SHA 3d6129dView commit details -
Auto merge of rust-lang#17905 - ChayimFriedman2:edition-dependent-raw…
…-keyword, r=Veykril fix: Properly account for editions in names This PR touches a lot of parts. But the main changes are changing `hir_expand::Name` to be raw edition-dependently and only when necessary (unrelated to how the user originally wrote the identifier), and changing `is_keyword()` and `is_raw_identifier()` to be edition-aware (this was done in rust-lang#17896, but the FIXMEs were fixed here). It is possible that I missed some cases, but most IDE parts should properly escape (or not escape) identifiers now. The rules of thumb are: - If we show the identifier to the user, its rawness should be determined by the edition of the edited crate. This is nice for IDE features, but really important for changes we insert to the source code. - For tests, I chose `Edition::CURRENT` (so we only have to (maybe) update tests when an edition becomes stable, to avoid churn). - For debugging tools (helper methods and logs), I used `Edition::LATEST`. Reviewing notes: This is a really big PR but most of it is mechanical translation. I changed `Name` displayers to require an edition, and followed the compiler errors. Most methods just propagate the edition requirement. The interesting cases are mostly in `ide-assists`, as sometimes the correct crate to fetch the edition from requires awareness (there may be two). `ide-completions` and `ide-diagnostics` were solved pretty easily by introducing an edition field to their context. `ide` contains many features, for most of them it was propagated to the top level function and there the edition was fetched based on the file. I also fixed all FIXMEs from rust-lang#17896. Some required introducing an edition parameter (usually not for many methods after the changes to `Name`), some were changed to a new method `is_any_identifier()` because they really want any possible keyword. Fixes rust-lang#17895. Fixes rust-lang#17774.
Configuration menu - View commit details
-
Copy full SHA for 6908451 - Browse repository at this point
Copy the full SHA 6908451View commit details -
Auto merge of rust-lang#17900 - darichey:exclude-vendored-libraries, …
…r=davidbarsky Add scip/lsif flag to exclude vendored libaries rust-lang#17809 changed StaticIndex to include vendored libraries. This PR adds a flag to disable that behavior. At work, our monorepo has too many rust targets to index all at once, so we split them up into several shards. Since all of our libraries are vendored, if rust-analyzer includes them, sharding no longer has much benefit, because every shard will have to index the entire transitive dependency graphs of all of its targets. We get around the issue presented in rust-lang#17809 because some other shard will index the libraries directly.
Configuration menu - View commit details
-
Copy full SHA for 995a014 - Browse repository at this point
Copy the full SHA 995a014View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fc487d - Browse repository at this point
Copy the full SHA 6fc487dView commit details -
Auto merge of rust-lang#17909 - darichey:remove-discoverProjectRunner…
…, r=lnicola Remove rust-analyzer.workspace.discoverProjectRunner The functionality for this vscode config option was removed in rust-lang#17395, so it doesn't do anything anymore.
Configuration menu - View commit details
-
Copy full SHA for 01245bd - Browse repository at this point
Copy the full SHA 01245bdView commit details
Commits on Aug 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d3fa5e9 - Browse repository at this point
Copy the full SHA d3fa5e9View commit details -
Auto merge of rust-lang#17917 - ShoyuVanilla:pin-rowan, r=lnicola
Pin `rowan` to `0.15.15` To prevent rust-lang#17914, I think that it would be safer pinning this before we fix it correctly
Configuration menu - View commit details
-
Copy full SHA for d2d41b4 - Browse repository at this point
Copy the full SHA d2d41b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4b8c65 - Browse repository at this point
Copy the full SHA c4b8c65View commit details -
Auto merge of rust-lang#17916 - ShoyuVanilla:issue-17711, r=Veykril
fix: Wrong BoundVar index when lowering impl trait parameter of parent generics Fixes rust-lang#17711 From the following test code; ```rust //- minicore: deref use core::ops::Deref; struct Struct<'a, T>(&'a T); trait Trait {} impl<'a, T: Deref<Target = impl Trait>> Struct<'a, T> { fn foo(&self) -> &Self { self } fn bar(&self) { let _ = self.foo(); } } ``` when we call `register_obligations_for_call` for `let _ = self.foo();`, https://github.com/rust-lang/rust-analyzer/blob/07659783fdfd4ec0a0bffa93017e33e31e567e42/crates/hir-ty/src/infer/expr.rs#L1939-L1952 we are querying `generic_predicates` and it has `T: Deref<Target = impl Trait>` predicate from the parent `impl Struct`; https://github.com/rust-lang/rust-analyzer/blob/07659783fdfd4ec0a0bffa93017e33e31e567e42/crates/hir-ty/src/lower.rs#L375-L399 but as we can see above, lowering `TypeRef = impl Trait` doesn't take into account the parent generic parameters, so the `BoundVar` index here is `0`, as `fn foo` has no generic args other than parent's, But this `BoundVar` is pointing at `'a` in `<'a, T: Deref<Target = impl Trait>>`. So, in the first code reference `register_obligations_for_call`'s L:1948 - `.substitute(Interner, parameters)`, we are substituting `'a` with `Ty`, not `Lifetime` and this makes panic inside the chalk. This PR fixes this wrong `BoundVar` index in such cases
Configuration menu - View commit details
-
Copy full SHA for eb12861 - Browse repository at this point
Copy the full SHA eb12861View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0ce97f - Browse repository at this point
Copy the full SHA d0ce97fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 324cf83 - Browse repository at this point
Copy the full SHA 324cf83View commit details -
Auto merge of rust-lang#17915 - Veykril:offline-no-deps, r=Veykril
feat: Make rust-analyzer work partially when offline Helps out with rust-lang/rust-analyzer#12499 a bit
Configuration menu - View commit details
-
Copy full SHA for 51e3775 - Browse repository at this point
Copy the full SHA 51e3775View commit details
Commits on Aug 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 74db4d3 - Browse repository at this point
Copy the full SHA 74db4d3View commit details
Commits on Aug 19, 2024
-
Auto merge of rust-lang#17925 - darichey:issue-17767, r=Veykril
Include generics when lowering extern type Fixes rust-lang#17767
Configuration menu - View commit details
-
Copy full SHA for 2c18533 - Browse repository at this point
Copy the full SHA 2c18533View commit details -
chore(config): remove
invocationLocation
in favor of `invocationStr……ategy` These flags were added to help rust-analyzer integrate with repos requiring non-Cargo invocations. The consensus is that having two independent settings are no longer needed. This change removes `invocationLocation` in favor of `invocationStrategy` and changes the internal representation of `InvocationStrategy::Once` to hold the workspace root.
Configuration menu - View commit details
-
Copy full SHA for 1bfb362 - Browse repository at this point
Copy the full SHA 1bfb362View commit details -
Auto merge of rust-lang#17888 - Tyrubias:remove-invocation-location, …
…r=Veykril chore(config): remove `invocationLocation` in favor of `invocationStrategy` These flags were added to help rust-analyzer integrate with repos requiring non-Cargo invocations. The consensus is that having two independent settings are no longer needed. This change removes `invocationLocation` in favor of `invocationStrategy` and changes the internal representation of `InvocationStrategy::Once` to hold the workspace root. Closes rust-lang#17848.
Configuration menu - View commit details
-
Copy full SHA for 85f6d15 - Browse repository at this point
Copy the full SHA 85f6d15View commit details -
Configuration menu - View commit details
-
Copy full SHA for 036affc - Browse repository at this point
Copy the full SHA 036affcView commit details -
Auto merge of rust-lang#17928 - roife:fix-issue-17869, r=Veykril
fix: keep comments in convert_while_to_loop Fix rust-lang#17869.
Configuration menu - View commit details
-
Copy full SHA for 05f5c77 - Browse repository at this point
Copy the full SHA 05f5c77View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2062ea - Browse repository at this point
Copy the full SHA b2062eaView commit details -
Auto merge of rust-lang#17929 - Veykril:invocation-loc-docs, r=Veykril
minor: Improve documentation for `InvocationStrategy` cc rust-lang/rust-analyzer#17888
Configuration menu - View commit details
-
Copy full SHA for f17e9a0 - Browse repository at this point
Copy the full SHA f17e9a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd6ea75 - Browse repository at this point
Copy the full SHA bd6ea75View commit details -
Configuration menu - View commit details
-
Copy full SHA for 879fa66 - Browse repository at this point
Copy the full SHA 879fa66View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea12d79 - Browse repository at this point
Copy the full SHA ea12d79View commit details -
Auto merge of rust-lang#17924 - ShoyuVanilla:issue-17921, r=Veykril
fix: Panic when a TAIT exists in a RPIT Fixes rust-lang#17921 When there is a TAIT inside of a RPIT like; ```rust trait Foo {} type Bar = impl Foo; fn foo<A>() -> impl Future<Output = Bar> { .. } ``` while inferencing `fn foo`, `insert_inference_vars_for_impl_trait` tries to substitute impl trait bounds of `Bar`, i.e. `Implemented(Foo)` with RPITs `placeholders`, and this causes panic https://github.com/rust-lang/rust-analyzer/blob/fa003262474185fd62168379500fe906b331824b/crates/hir-ty/src/infer.rs#L903-L905
Configuration menu - View commit details
-
Copy full SHA for f9c0c8a - Browse repository at this point
Copy the full SHA f9c0c8aView commit details -
ServerStatusParams should consider 'prime caches' in quiescent status
Priming caches is a performance win, but it takes a lock on the salsa database and prevents rust-analyzer from responding to e.g. go-to-def requests. This causes confusion for users, who see the spinner next to rust-analyzer in the VS Code footer stop, so they start attempting to navigate their code. Instead, set the `quiescent` status in LSP to false during cache priming, so the VS Code spinner persists until we can respond to any LSP request.
Configuration menu - View commit details
-
Copy full SHA for f25cb80 - Browse repository at this point
Copy the full SHA f25cb80View commit details -
Auto merge of rust-lang#17886 - Wilfred:prime_caches_quiescent, r=Vey…
…kril internal: ServerStatusParams should consider 'prime caches' in quiescent status Priming caches is a performance win, but it takes a lock on the salsa database and prevents rust-analyzer from responding to e.g. go-to-def requests. This causes confusion for users, who see the spinner next to rust-analyzer in the VS Code footer stop, so they start attempting to navigate their code. Instead, set the `quiescent` status in LSP to false during cache priming, so the VS Code spinner persists until we can respond to any LSP request.
Configuration menu - View commit details
-
Copy full SHA for df6ce96 - Browse repository at this point
Copy the full SHA df6ce96View commit details
Commits on Aug 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a7d15a8 - Browse repository at this point
Copy the full SHA a7d15a8View commit details -
Auto merge of rust-lang#17932 - Veykril:default-reply-lat-sensitive, …
…r=Veykril fix: Fix panics for semantic highlighting at startup Without this we might try to process semantic highlighting requests before the database has entries for the given file resulting in a panic. There is no work to be done either way so delay this like we do with other request handlers.
Configuration menu - View commit details
-
Copy full SHA for a9e3555 - Browse repository at this point
Copy the full SHA a9e3555View commit details -
Configuration menu - View commit details
-
Copy full SHA for a42c732 - Browse repository at this point
Copy the full SHA a42c732View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e31598 - Browse repository at this point
Copy the full SHA 8e31598View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b2eaa5 - Browse repository at this point
Copy the full SHA 1b2eaa5View commit details -
Auto merge of rust-lang#17930 - Veykril:config-user-config, r=alibektas
Remove the ability to configure the user config path Being able to do this makes little sense as this is effectively a cyclic dependency (and we do not want to fixpoint this really).
Configuration menu - View commit details
-
Copy full SHA for 085aac3 - Browse repository at this point
Copy the full SHA 085aac3View commit details -
Auto merge of rust-lang#17913 - alibektas:ratoml_improvements, r=alib…
…ektas fix: Add workspace level config to ratoml
Configuration menu - View commit details
-
Copy full SHA for 9cb66c2 - Browse repository at this point
Copy the full SHA 9cb66c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94f206a - Browse repository at this point
Copy the full SHA 94f206aView commit details
Commits on Aug 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3f89eeb - Browse repository at this point
Copy the full SHA 3f89eebView commit details -
Configuration menu - View commit details
-
Copy full SHA for db2e8e1 - Browse repository at this point
Copy the full SHA db2e8e1View commit details
Commits on Aug 22, 2024
-
Auto merge of rust-lang#17939 - ShoyuVanilla:maybe-sized-fix, r=Veykril
fix: Wrong `Sized` predicate for `generic_predicates_for_param` I found this gathers wrong `Self: Sized` bound while implementing object safety, though I couldn't find proper test for this. If we call `generic_predicates_for_param` to `Bar` in the following code; ```rust trait Foo<T: ?Sized> {} trait Bar<T: Foo<Self> + ?Sized> {} ``` it returns `T: Sized` and `Self: Sized` bound, because normaly, the `?Sized` bound applied properly in L1059 with; https://github.com/rust-lang/rust-analyzer/blob/3723e5910c14f0ffbd13de474b8a8fcc74db04ce/crates/hir-ty/src/lower.rs#L1035-L1061 But we filter them before it is lowered with that function here; https://github.com/rust-lang/rust-analyzer/blob/3723e5910c14f0ffbd13de474b8a8fcc74db04ce/crates/hir-ty/src/lower.rs#L1540-L1586 So, the `?Sized` bounded params are not gathered into `ctx.unsized_types` and thus we are applying them implicit `Sized` bound here; https://github.com/rust-lang/rust-analyzer/blob/3723e5910c14f0ffbd13de474b8a8fcc74db04ce/crates/hir-ty/src/lower.rs#L1591-L1602
Configuration menu - View commit details
-
Copy full SHA for 614fb24 - Browse repository at this point
Copy the full SHA 614fb24View commit details -
Configuration menu - View commit details
-
Copy full SHA for f845536 - Browse repository at this point
Copy the full SHA f845536View commit details -
Configuration menu - View commit details
-
Copy full SHA for d893dcc - Browse repository at this point
Copy the full SHA d893dccView commit details -
Configuration menu - View commit details
-
Copy full SHA for aeb9c7b - Browse repository at this point
Copy the full SHA aeb9c7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1179cbb - Browse repository at this point
Copy the full SHA 1179cbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e82e44 - Browse repository at this point
Copy the full SHA 8e82e44View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d61444 - Browse repository at this point
Copy the full SHA 4d61444View commit details -
Configuration menu - View commit details
-
Copy full SHA for d79999a - Browse repository at this point
Copy the full SHA d79999aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b0e7ef4 - Browse repository at this point
Copy the full SHA b0e7ef4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9db48f - Browse repository at this point
Copy the full SHA f9db48fView commit details -
Auto merge of rust-lang#17942 - HKalbasi:fp-const-eval, r=HKalbasi
Implement floating point casts in const eval fix rust-lang#17926
Configuration menu - View commit details
-
Copy full SHA for 06228b9 - Browse repository at this point
Copy the full SHA 06228b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 71c7cea - Browse repository at this point
Copy the full SHA 71c7ceaView commit details -
Auto merge of rust-lang#17898 - Veykril:descend-2.0, r=Veykril
internal: Improve macro token mapping heuristics Fixes rust-lang/rust-analyzer#16235
Configuration menu - View commit details
-
Copy full SHA for 81a9956 - Browse repository at this point
Copy the full SHA 81a9956View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a27711 - Browse repository at this point
Copy the full SHA 0a27711View commit details -
Auto merge of rust-lang#17943 - Veykril:diags, r=Veykril
fix: Improve proc-macro panic message and workspace loading failure diagnostic
Configuration menu - View commit details
-
Copy full SHA for 1b0e158 - Browse repository at this point
Copy the full SHA 1b0e158View commit details -
When descending into macros in search, first check if there is a need…
… to - i.e. if we are inside a macro call This avoids the need to analyze the file when we are not inside a macro call. This is especially important for the optimization in the next commit(s), as there the common case will be to descent into macros but then not analyze.
Configuration menu - View commit details
-
Copy full SHA for f65d605 - Browse repository at this point
Copy the full SHA f65d605View commit details -
Speed up search for short associated functions, especially very commo…
…n identifiers such as `new` The search is used by IDE features such as rename and find all references. The search is slow because we need to verify each candidate, and that requires analyzing it; the key to speeding it up is to avoid the analysis where possible. I did that with a bunch of tricks that exploits knowledge about the language and its possibilities. The first key insight is that associated methods may only be referenced in the form `ContainerName::func_name` (parentheses are not necessary!) (Rust doesn't include a way to `use Container::func_name`, and even if it will in the future most usages are likely to stay in that form. Searching for `::` will help only a bit, but searching for `Container` can help considerably, since it is very rare that there will be two identical instances of both a container and a method of it. However, things are not as simple as they sound. In Rust a container can be aliased in multiple ways, and even aliased from different files/modules. If we will try to resolve the alias, we will lose any gain from the textual search (although very common method names such as `new` will still benefit, most will suffer because there are more instances of a container name than its associated item). This is where the key trick enters the picture. The key insight is that there is still a textual property: a container namer cannot be aliased, unless its name is mentioned in the alias declaration, or a name of alias of it is mentioned in the alias declaration. This becomes a fixpoint algorithm: we expand our list of aliases as we collect more and more (possible) aliases, until we eventually reach a fixpoint. A fixpoint is not guaranteed (and we do have guards for the rare cases where it does not happen), but it is almost so: most types have very few aliases, if at all. We do use some semantic information while analyzing aliases. It's a balance: too much semantic analysis, and the search will become slow. But too few of it, and we will bring many incorrect aliases to our list, and risk it expands and expands and never reach a fixpoint. At the end, based on benchmarks, it seems worth to do a lot to avoid adding an alias (but not too much), while it is worth to do a lot to avoid the need to semantically analyze func_name matches (but again, not too much). After we collected our list of aliases, we filter matches based on this list. Only if a match can be real, we do semantic analysis for it. The results are promising: searching for all references on `new()` in `base-db` in the rust-analyzer repository, which previously took around 60 seconds, now takes as least as two seconds and a half (roughly), while searching for `Vec::new()`, almost an upper bound to how much a symbol can be used, that used to take 7-9 minutes(!) now completes in 100-120 seconds, and with less than half of non-verified results (aka. false positives). This is the less strictly correct (but faster) of this patch; it can miss some (rare) cases (there is a test for that - `goto_ref_on_short_associated_function_complicated_type_magic_can_confuse_our_logic()`). There is another branch that have no false negatives but is slower to search (`Vec::new()` never reaches a fixpoint in aliases collection there). I believe it is possible to create a strategy that will have the best of both worlds, but it will involve significant complexity and I didn't bother, especially considering that in the vast majority of the searches the other branch will be more than enough. But all in all, I decided to bring this branch (of course if the maintainers will agree), since our search is already not 100% accurate (it misses macros), and I believe there is value in the additional perf.
Configuration menu - View commit details
-
Copy full SHA for a57def2 - Browse repository at this point
Copy the full SHA a57def2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a44152a - Browse repository at this point
Copy the full SHA a44152aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0251cfa - Browse repository at this point
Copy the full SHA 0251cfaView commit details
Commits on Aug 23, 2024
-
Auto merge of rust-lang#17912 - alibektas:cargo_check_on_binary, r=Ve…
…ykril fix: run flycheck without rev_deps when target is specified Since querying for a crate's target is a call to salsa and therefore blocking, flycheck task is now deferred out of main thread by using `GlobalState`s `deferred_task_queue`. Fixes rust-lang#17829 and rust-lang/rustlings#2071
Configuration menu - View commit details
-
Copy full SHA for b88a4f0 - Browse repository at this point
Copy the full SHA b88a4f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 916c559 - Browse repository at this point
Copy the full SHA 916c559View commit details -
Auto merge of rust-lang#17927 - ChayimFriedman2:speedup-new-usages, r…
…=Veykril perf: Speed up search for short associated functions, especially very common identifiers such as `new` `@Veykril` said in rust-lang/rust-analyzer#17908 (comment) that people complain searches for `new()` are slow (they are right), so here I am to help! The search is used by IDE features such as rename and find all references. The search is slow because we need to verify each candidate, and that requires analyzing it; the key to speeding it up is to avoid the analysis where possible. I did that with a bunch of tricks that exploits knowledge about the language and its possibilities. The first key insight is that associated methods may only be referenced in the form `ContainerName::func_name` (parentheses are not necessary!) (Rust doesn't include a way to `use Container::func_name`, and even if it will in the future most usages are likely to stay in that form. Searching for `::` will help only a bit, but searching for `Container` can help considerably, since it is very rare that there will be two identical instances of both a container and a method of it. However, things are not as simple as they sound. In Rust a container can be aliased in multiple ways, and even aliased from different files/modules. If we will try to resolve the alias, we will lose any gain from the textual search (although very common method names such as `new` will still benefit, most will suffer because there are more instances of a container name than its associated item). This is where the key trick enters the picture. The key insight is that there is still a textual property: a container namer cannot be aliased, unless its name is mentioned in the alias declaration, or a name of alias of it is mentioned in the alias declaration. This becomes a fixpoint algorithm: we expand our list of aliases as we collect more and more (possible) aliases, until we eventually reach a fixpoint. A fixpoint is not guaranteed (and we do have guards for the rare cases where it does not happen), but it is almost so: most types have very few aliases, if at all. We do use some semantic information while analyzing aliases. It's a balance: too much semantic analysis, and the search will become slow. But too few of it, and we will bring many incorrect aliases to our list, and risk it expands and expands and never reach a fixpoint. At the end, based on benchmarks, it seems worth to do a lot to avoid adding an alias (but not too much), while it is worth to do a lot to avoid the need to semantically analyze func_name matches (but again, not too much). After we collected our list of aliases, we filter matches based on this list. Only if a match can be real, we do semantic analysis for it. The results are promising: searching for all references on `new()` in `base-db` in the rust-analyzer repository, which previously took around 60 seconds, now takes as least as two seconds and a half (roughly), while searching for `Vec::new()`, almost an upper bound to how much a symbol can be used, that used to take 7-9 minutes(!) now completes in 100-120 seconds, and with less than half of non-verified results (aka. false positives). This is the less strictly correct (but faster) branch of this patch; it can miss some (rare) cases (there is a test for that - `goto_ref_on_short_associated_function_complicated_type_magic_can_confuse_our_logic()`). There is another branch that have no false negatives but is slower to search (`Vec::new()` never reaches a fixpoint in aliases collection there). I believe it is possible to create a strategy that will have the best of both worlds, but it will involve significant complexity and I didn't bother, especially considering that in the vast majority of the searches the other branch will be more than enough. But all in all, I decided to bring this branch (of course if the maintainers will agree), since our search is already not 100% accurate (it misses macros), and I believe there is value in the additional perf. You can find the strict branch at https://github.com/ChayimFriedman2/rust-analyzer/tree/speedup-new-usages-strict. Should fix rust-lang#7404, I guess (will check now).
Configuration menu - View commit details
-
Copy full SHA for 39cc5b6 - Browse repository at this point
Copy the full SHA 39cc5b6View commit details -
Auto merge of rust-lang#17936 - Veykril:module_path, r=Veykril
feat: Implement `module_path` macro Turns out this is a pain to implement because of our hir-def hir-expand split :)
Configuration menu - View commit details
-
Copy full SHA for ac912c7 - Browse repository at this point
Copy the full SHA ac912c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f7489a - Browse repository at this point
Copy the full SHA 5f7489aView commit details -
Auto merge of rust-lang#17946 - Veykril:flycheck-crates-for, r=Veykril
internal: Don't requery crates_for for flycheck when crates are known
Configuration menu - View commit details
-
Copy full SHA for e030cf0 - Browse repository at this point
Copy the full SHA e030cf0View commit details -
Auto merge of rust-lang#17857 - ChayimFriedman2:rust-project-cfg-grou…
…p, r=Veykril feat: Allow declaring cfg groups in rust-project.json, to help sharing common cfgs Closes rust-lang#17815.
Configuration menu - View commit details
-
Copy full SHA for 3a097e1 - Browse repository at this point
Copy the full SHA 3a097e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb896a5 - Browse repository at this point
Copy the full SHA eb896a5View commit details -
Auto merge of rust-lang#17948 - ShoyuVanilla:parent-self-sized, r=Vey…
…kril fix: Wrong `Self: Sized` predicate for trait assoc items Again while implementing object safety like rust-lang#17939 😅 If we call `generic_predicates_query` on `fn foo` in the following code; ``` trait Foo { fn foo(); } ``` It returns implicit bound `Self: Sized`, even though `Self` is not appearing as a generic parameter inside angle brackets, but as a parent generic parameter, "trait self". This PR prevent pushing "implicit" `Self: Sized` predicates in such cases
Configuration menu - View commit details
-
Copy full SHA for 3bd42d3 - Browse repository at this point
Copy the full SHA 3bd42d3View commit details
Commits on Aug 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bdbc057 - Browse repository at this point
Copy the full SHA bdbc057View commit details -
Auto merge of rust-lang#17949 - Wilfred:include_build_file_in_watcher…
…s, r=lnicola fix: rust-analyzer should watch build files from rust-project.json rust-analyzer always watches Cargo.toml for changes, but other build systems using rust-project.json have their own build files. Ensure we also watch those for changes, so we know when to reconfigure rust-analyzer when dependencies change.
Configuration menu - View commit details
-
Copy full SHA for a074e1a - Browse repository at this point
Copy the full SHA a074e1aView commit details -
Fix few bugs in closure capture computation, and add tests
Also create a test infrastructure for capture computation.
Configuration menu - View commit details
-
Copy full SHA for 12faedd - Browse repository at this point
Copy the full SHA 12faeddView commit details -
Preserve all spans for closure captures, not just one
This is important for the "convert closure to fn" assist, as it needs to find and modify the places the captures are used.
Configuration menu - View commit details
-
Copy full SHA for 77ab568 - Browse repository at this point
Copy the full SHA 77ab568View commit details -
We don't yet lower or maybe even parse them, but blocks already have `gen`, so why not.
Configuration menu - View commit details
-
Copy full SHA for cf243e5 - Browse repository at this point
Copy the full SHA cf243e5View commit details -
Handle associated types that are lang items
Previously we were ignoring them.
Configuration menu - View commit details
-
Copy full SHA for 1e0df17 - Browse repository at this point
Copy the full SHA 1e0df17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c6a521 - Browse repository at this point
Copy the full SHA 2c6a521View commit details -
Configuration menu - View commit details
-
Copy full SHA for 737a969 - Browse repository at this point
Copy the full SHA 737a969View commit details -
Modify
hacks::parse_expr_from_str()
to take an edition tooThis will be needed as we parse unknown identifiers and want to insert them into source code.
Configuration menu - View commit details
-
Copy full SHA for 7339337 - Browse repository at this point
Copy the full SHA 7339337View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6340522 - Browse repository at this point
Copy the full SHA 6340522View commit details -
Impl PartialEq and Eq for
IndentLevel
We can impl PartialOrd and Ord too, but I didn't need that.
Configuration menu - View commit details
-
Copy full SHA for becfc5a - Browse repository at this point
Copy the full SHA becfc5aView commit details
Commits on Aug 25, 2024
-
Don't enable the search fast path for short associated functions when…
… a search scope is set In most places where we set a search scope it is a single file, and so the fast path will actually harm performance, since it has to search for aliases in the whole project. The only exception that qualifies for the fast path is SSR (there is an exception that don't qualify for the fast path as it search for `use` items). It sets the search scope to avoid dependencies. We could make it use the fast path, but I didn't bother.
Configuration menu - View commit details
-
Copy full SHA for 7bd3ca1 - Browse repository at this point
Copy the full SHA 7bd3ca1View commit details -
Auto merge of rust-lang#17955 - ChayimFriedman2:fix-fast-search-with-…
…scope, r=Veykril fix: Don't enable the search fast path for short associated functions when a search scope is set In most places where we set a search scope it is a single file, and so the fast path will actually harm performance, since it has to search for aliases in the whole project. The only exception that qualifies for the fast path is SSR (there is an exception that don't qualify for the fast path as it search for `use` items). It sets the search scope to avoid dependencies. We could make it use the fast path, but I didn't bother. I forgot this while working on rust-lang#17927.
Configuration menu - View commit details
-
Copy full SHA for cba00a8 - Browse repository at this point
Copy the full SHA cba00a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9d8d94 - Browse repository at this point
Copy the full SHA d9d8d94View commit details -
Auto merge of rust-lang#17956 - Veykril:metadata-err, r=Veykril
fix: Fix metadata retrying eating original errors
Configuration menu - View commit details
-
Copy full SHA for c223013 - Browse repository at this point
Copy the full SHA c223013View commit details -
Configuration menu - View commit details
-
Copy full SHA for 606401f - Browse repository at this point
Copy the full SHA 606401fView commit details -
Auto merge of rust-lang#17958 - Veykril:deref-chain-method-completion…
…s, r=Veykril fix: Fix trait method completions not acknowledging Deref impls
Configuration menu - View commit details
-
Copy full SHA for bdee5c9 - Browse repository at this point
Copy the full SHA bdee5c9View commit details -
fix: add extra_test_bin_args to test explorer test runner
trim whitespace
duncan committedAug 25, 2024 Configuration menu - View commit details
-
Copy full SHA for 2703ea1 - Browse repository at this point
Copy the full SHA 2703ea1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 98e23d3 - Browse repository at this point
Copy the full SHA 98e23d3View commit details -
Auto merge of rust-lang#17961 - Veykril:autoderef-alloc, r=Veykril
internal: Don't allocate autoderef steps when not needed
Configuration menu - View commit details
-
Copy full SHA for 31a532a - Browse repository at this point
Copy the full SHA 31a532aView commit details -
Auto merge of rust-lang#17960 - duncanawoods:master, r=HKalbasi
fix: add extra_test_bin_args to test explorer test runner `@HKalbasi` I thought I included this in rust-lang#17470 but it appears not so I have created a new issue rust-lang#17959 for this fix.
Configuration menu - View commit details
-
Copy full SHA for e0b1719 - Browse repository at this point
Copy the full SHA e0b1719View commit details -
Fix Return Type Syntax to include
..
(i.e.method(..)
and not `me……thod()`) as specified in the RFC
Configuration menu - View commit details
-
Copy full SHA for 326a1c6 - Browse repository at this point
Copy the full SHA 326a1c6View commit details
Commits on Aug 26, 2024
-
Auto merge of rust-lang#17962 - ChayimFriedman2:update-rtn, r=Veykril
fix: Fix Return Type Syntax to include `..` (i.e. `method(..)` and not `method()`) as specified in the RFC Fixes rust-lang#17952.
Configuration menu - View commit details
-
Copy full SHA for a3f1196 - Browse repository at this point
Copy the full SHA a3f1196View commit details -
Auto merge of rust-lang#17941 - ChayimFriedman2:pre-closure-to-fn, r=…
…Veykril Preliminary work for rust-lang#17940 I split the PR as requested, and made small commits.
Configuration menu - View commit details
-
Copy full SHA for 239dc5d - Browse repository at this point
Copy the full SHA 239dc5dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9dad25a - Browse repository at this point
Copy the full SHA 9dad25aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d4fdc0 - Browse repository at this point
Copy the full SHA 9d4fdc0View commit details -
Auto merge of rust-lang#17963 - avrong:avrong/error-lifetimes, r=Veykril
Always show error lifetime arguments as `'_` Fixes rust-lang#17947 Changed error lifetime argument presentation in non-test environment to `'_` and now showing them even if all of args are error lifetimes. This also influenced some of the other tests like `extract_function.rs`, `predicate.rs` and `type_pos.rs`. Not sure whether I need to refrain from adding lifetimes args there. Happy to fix if needed
Configuration menu - View commit details
-
Copy full SHA for 05e6fb6 - Browse repository at this point
Copy the full SHA 05e6fb6View commit details -
Fix "Unwrap block" assist with block modifiers
The assist just assumes the `{` will be the first character, which led to strange outputs such as `nsafe {`.
Configuration menu - View commit details
-
Copy full SHA for 65e9f8b - Browse repository at this point
Copy the full SHA 65e9f8bView commit details
Commits on Aug 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 65d25fe - Browse repository at this point
Copy the full SHA 65d25feView commit details -
Auto merge of rust-lang#17972 - rust-lang:revert-17936-module_path, r…
…=Veykril Revert "feat: Implement `module_path` macro" Reverts rust-lang/rust-analyzer#17936 Fixes rust-lang/rust-analyzer#17968
Configuration menu - View commit details
-
Copy full SHA for f0bfd43 - Browse repository at this point
Copy the full SHA f0bfd43View commit details -
Auto merge of rust-lang#17970 - ChayimFriedman2:unwrap-unsafe-block, …
…r=Veykril fix: Fix "Unwrap block" assist with block modifiers The assist just assumes the `{` will be the first character, which led to strange outputs such as `nsafe {`. Fixes rust-lang#17964.
Configuration menu - View commit details
-
Copy full SHA for 6593688 - Browse repository at this point
Copy the full SHA 6593688View commit details -
Configuration menu - View commit details
-
Copy full SHA for df4580b - Browse repository at this point
Copy the full SHA df4580bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b592256 - Browse repository at this point
Copy the full SHA b592256View commit details -
Auto merge of rust-lang#17973 - Veykril:proc-macro-curr-dir, r=Veykril
Expand proc-macros in workspace root, not package root Should fix rust-lang/rust-analyzer#17748. The approach is generally not perfect though as rust-project.json projects don't benefit from this (still, nothing changes in that regard)
Configuration menu - View commit details
-
Copy full SHA for e4c404e - Browse repository at this point
Copy the full SHA e4c404eView commit details -
Auto merge of rust-lang#17974 - lnicola:rm-apache-appendix, r=lnicola
internal: Drop Apache license appendices Closes rust-lang#14586 Similar to rust-lang#67734
Configuration menu - View commit details
-
Copy full SHA for 2dce250 - Browse repository at this point
Copy the full SHA 2dce250View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9a3b02 - Browse repository at this point
Copy the full SHA c9a3b02View commit details -
Auto merge of rust-lang#17757 - alibektas:toggle_macro_delimiters, r=…
…Veykril assist: Add new assist toggle_macro_delimiter Closes rust-lang#17716
Configuration menu - View commit details
-
Copy full SHA for 199c01d - Browse repository at this point
Copy the full SHA 199c01dView commit details -
Create an assist to convert closure to freestanding fn
The assist converts all captures to parameters.
Configuration menu - View commit details
-
Copy full SHA for 34e50f5 - Browse repository at this point
Copy the full SHA 34e50f5View commit details
Commits on Aug 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 51055f7 - Browse repository at this point
Copy the full SHA 51055f7View commit details -
Auto merge of rust-lang#17981 - lnicola:proc-macro-cwd, r=Veykril
minor: Fix cwd used for proc macro expansion Fixes rust-lang#17980.
Configuration menu - View commit details
-
Copy full SHA for 248a557 - Browse repository at this point
Copy the full SHA 248a557View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4880eee - Browse repository at this point
Copy the full SHA 4880eeeView commit details -
Consider all expressions that autoderef in "Extract variable", not ju…
…st method and field accesses.
Configuration menu - View commit details
-
Copy full SHA for 2a7ec0b - Browse repository at this point
Copy the full SHA 2a7ec0bView commit details -
Don't add reference when it isn't needed for the "Extract variable" a…
…ssist I.e. don't generate `let var_name = &foo()`. Anything that creates a new value don't need a reference. That excludes mostly field accesses and indexing. I had a thought that we can also not generate a reference for fields and indexing as long as the type is `Copy`, but sometimes people impl `Copy` even when they don't want to copy the values (e.g. a large type), so I didn't do that.
Configuration menu - View commit details
-
Copy full SHA for fe5f91e - Browse repository at this point
Copy the full SHA fe5f91eView commit details -
internal: Avoid newlines in fetch workspace errors
Most logs lines don't have newlines, ensure fetch workspace errors follow this pattern. Before: 2024-08-28T21:11:58.431856Z ERROR FetchWorkspaceError: rust-analyzer failed to discover workspace After: 2024-08-28T21:11:58.431856Z ERROR FetchWorkspaceError: rust-analyzer failed to discover workspace
Configuration menu - View commit details
-
Copy full SHA for 5aefe78 - Browse repository at this point
Copy the full SHA 5aefe78View commit details -
Also handle deref expressions in "Extract variable"
And BTW, remove the parentheses of the extracted expression if there are.
Configuration menu - View commit details
-
Copy full SHA for 3ff3d39 - Browse repository at this point
Copy the full SHA 3ff3d39View commit details -
Consider field attributes when converting from tuple to named struct …
…and the opposite
Configuration menu - View commit details
-
Copy full SHA for b3fcd8e - Browse repository at this point
Copy the full SHA b3fcd8eView commit details
Commits on Aug 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c2c1bd0 - Browse repository at this point
Copy the full SHA c2c1bd0View commit details -
Auto merge of rust-lang#17992 - Wilfred:newlines_in_logs, r=Veykril
internal: Avoid newlines in fetch errors Most logs lines don't have newlines, ensure fetch errors follow this pattern. This makes it easier to see which log line is associated with the error. Before: 2024-08-28T21:11:58.431856Z ERROR FetchWorkspaceError: rust-analyzer failed to discover workspace After: 2024-08-28T21:11:58.431856Z ERROR FetchWorkspaceError: rust-analyzer failed to discover workspace
Configuration menu - View commit details
-
Copy full SHA for 3a14e30 - Browse repository at this point
Copy the full SHA 3a14e30View commit details -
fix: Fix proc-macro server crashing when parsing a non-lexable string…
… into a TokenStream
Configuration menu - View commit details
-
Copy full SHA for 14ec120 - Browse repository at this point
Copy the full SHA 14ec120View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03d6745 - Browse repository at this point
Copy the full SHA 03d6745View commit details -
Auto merge of rust-lang#17994 - Veykril:proc-macro-srv-from-str-panic…
…, r=Veykril fix: Fix TokenStream::to_string implementation dropping quotation marks Fixes rust-lang/rust-analyzer#17986 We might wanna consider backporting this to beta if that's simple enough to do
Configuration menu - View commit details
-
Copy full SHA for 266bb1f - Browse repository at this point
Copy the full SHA 266bb1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ec71c8 - Browse repository at this point
Copy the full SHA 2ec71c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26888c3 - Browse repository at this point
Copy the full SHA 26888c3View commit details -
Auto merge of rust-lang#17995 - lnicola:sync-from-rust, r=lnicola
minor: sync from downstream
Configuration menu - View commit details
-
Copy full SHA for f05888d - Browse repository at this point
Copy the full SHA f05888dView commit details -
Auto merge of rust-lang#17940 - ChayimFriedman2:closure-to-fn, r=Veykril
feat: Create an assist to convert closure to freestanding fn The assist converts all captures to parameters. Closes rust-lang#17920. This was more work than I though, since it has to handle a bunch of edge cases... Based on rust-lang#17941. Needs to merge it first.
Configuration menu - View commit details
-
Copy full SHA for b195ff3 - Browse repository at this point
Copy the full SHA b195ff3View commit details -
Auto merge of rust-lang#17988 - darichey:fix-scip-def, r=Veykril
Fix incorrect symbol definitions in SCIP output The SCIP output incorrectly marks some symbols as definitions because it doesn't account for the file ID when comparing the token's range to its definition's range. This means that if a symbol is referenced in a file at the same position at which it is defined in another file, that reference will be marked as a definition. I was quite surprised by how common this is. For example, `PartialEq` is defined [here](https://github.com/rust-lang/rust/blob/1.80.1/library/core/src/cmp.rs#L273) and `uuid` references it [here](https://github.com/uuid-rs/uuid/blob/1.8.0/src/lib.rs#L329). And what do you know, they're both at offset 10083! In our large monorepo, this happens for basically every common stdlib type!
Configuration menu - View commit details
-
Copy full SHA for e0625d5 - Browse repository at this point
Copy the full SHA e0625d5View commit details -
Auto merge of rust-lang#17987 - ChayimFriedman2:column-macro, r=Veykril
fix: Fix name resolution of shadowed builtin macro Fixes rust-lang#17969.
Configuration menu - View commit details
-
Copy full SHA for b6d0fd0 - Browse repository at this point
Copy the full SHA b6d0fd0View commit details -
Auto merge of rust-lang#17991 - ChayimFriedman2:extract-variable-ref,…
… r=Veykril fix: Don't add reference when it isn't needed for the "Extract variable" assist I.e. don't generate `let var_name = &foo()`. Because it always irritates me when I need to fix that. Anything that creates a new value don't need a reference. That excludes mostly field accesses and indexing. I had a thought that we can also not generate a reference for fields and indexing as long as the type is `Copy`, but sometimes people impl `Copy` even when they don't want to copy the values (e.g. a large type), so I didn't do that.
Configuration menu - View commit details
-
Copy full SHA for cd377d9 - Browse repository at this point
Copy the full SHA cd377d9View commit details -
Auto merge of rust-lang#17993 - ChayimFriedman2:convert-to-tuple-attr…
…s, r=Veykril Consider field attributes when converting from tuple to named struct and the opposite Fixes rust-lang#17983. I tried to use the `SourceChangeBuilder::make_mut()` API, but it duplicated the attribute...
Configuration menu - View commit details
-
Copy full SHA for 34e7e79 - Browse repository at this point
Copy the full SHA 34e7e79View commit details