-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
#109069
⬆️ rust-analyzer
#109069
Commits on Feb 17, 2023
-
add openDocs to context menu. add further restrictions to context men…
…u when clauses to prevent irrelevant commands in non-rust files
Configuration menu - View commit details
-
Copy full SHA for ed1f467 - Browse repository at this point
Copy the full SHA ed1f467View commit details
Commits on Feb 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4438017 - Browse repository at this point
Copy the full SHA 4438017View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83e24fe - Browse repository at this point
Copy the full SHA 83e24feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2351875 - Browse repository at this point
Copy the full SHA 2351875View commit details -
Configuration menu - View commit details
-
Copy full SHA for d416623 - Browse repository at this point
Copy the full SHA d416623View commit details
Commits on Feb 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7e711da - Browse repository at this point
Copy the full SHA 7e711daView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd92e4a - Browse repository at this point
Copy the full SHA dd92e4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b5cfdd - Browse repository at this point
Copy the full SHA 7b5cfddView commit details
Commits on Feb 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 549b53b - Browse repository at this point
Copy the full SHA 549b53bView commit details -
Auto merge of rust-lang#14181 - lnicola:sync-from-rust, r=lnicola
minor: Sync from downstream
Configuration menu - View commit details
-
Copy full SHA for dad6b14 - Browse repository at this point
Copy the full SHA dad6b14View commit details -
Configuration menu - View commit details
-
Copy full SHA for f40526b - Browse repository at this point
Copy the full SHA f40526bView commit details -
Auto merge of rust-lang#14182 - lnicola:rm-profdata, r=lnicola
minor: Remove file added by mistake This got added somehow in rust-lang/rust-analyzer#14154.
Configuration menu - View commit details
-
Copy full SHA for e59ada9 - Browse repository at this point
Copy the full SHA e59ada9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 563bd9c - Browse repository at this point
Copy the full SHA 563bd9cView commit details -
Auto merge of rust-lang#14183 - lnicola:rustfmt-command-docs, r=lowr
minor: Try to improve the `rustfmt.overrideCommand` docs Closes rust-lang#14078
Configuration menu - View commit details
-
Copy full SHA for 27239fb - Browse repository at this point
Copy the full SHA 27239fbView commit details
Commits on Feb 23, 2023
-
Rename many interner functions.
(This is a large commit. The changes to `compiler/rustc_middle/src/ty/context.rs` are the most important ones.) The current naming scheme is a mess, with a mix of `_intern_`, `intern_` and `mk_` prefixes, with little consistency. In particular, in many cases it's easy to use an iterator interner when a (preferable) slice interner is available. The guiding principles of the new naming system: - No `_intern_` prefixes. - The `intern_` prefix is for internal operations. - The `mk_` prefix is for external operations. - For cases where there is a slice interner and an iterator interner, the former is `mk_foo` and the latter is `mk_foo_from_iter`. Also, `slice_interners!` and `direct_interners!` can now be `pub` or non-`pub`, which helps enforce the internal/external operations division. It's not perfect, but I think it's a clear improvement. The following lists show everything that was renamed. slice_interners - const_list - mk_const_list -> mk_const_list_from_iter - intern_const_list -> mk_const_list - substs - mk_substs -> mk_substs_from_iter - intern_substs -> mk_substs - check_substs -> check_and_mk_substs (this is a weird one) - canonical_var_infos - intern_canonical_var_infos -> mk_canonical_var_infos - poly_existential_predicates - mk_poly_existential_predicates -> mk_poly_existential_predicates_from_iter - intern_poly_existential_predicates -> mk_poly_existential_predicates - _intern_poly_existential_predicates -> intern_poly_existential_predicates - predicates - mk_predicates -> mk_predicates_from_iter - intern_predicates -> mk_predicates - _intern_predicates -> intern_predicates - projs - intern_projs -> mk_projs - place_elems - mk_place_elems -> mk_place_elems_from_iter - intern_place_elems -> mk_place_elems - bound_variable_kinds - mk_bound_variable_kinds -> mk_bound_variable_kinds_from_iter - intern_bound_variable_kinds -> mk_bound_variable_kinds direct_interners - region - intern_region (unchanged) - const - mk_const_internal -> intern_const - const_allocation - intern_const_alloc -> mk_const_alloc - layout - intern_layout -> mk_layout - adt_def - intern_adt_def -> mk_adt_def_from_data (unusual case, hard to avoid) - alloc_adt_def(!) -> mk_adt_def - external_constraints - intern_external_constraints -> mk_external_constraints Other - type_list - mk_type_list -> mk_type_list_from_iter - intern_type_list -> mk_type_list - tup - mk_tup -> mk_tup_from_iter - intern_tup -> mk_tup
Configuration menu - View commit details
-
Copy full SHA for 888c18d - Browse repository at this point
Copy the full SHA 888c18dView commit details
Commits on Feb 24, 2023
-
Auto merge of rust-lang#14175 - jmviz:openDocs-context-menu, r=lnicola
add openDocs command to context menu in VS Code extension This adds the `openDocs` command to the VS Code context menu. I believe there are probably many user who are unaware of this command existing in the rust analyzer extension, and that this should enhance the discoverability of the command. Additionally, even if people are aware of this capability, it's helpful to have this in the context menu anyway; for example, one might forget the name of the command, or the keybinding they have assigned to it. I think that opening docs is a common enough action to warrant the extra line added to the context menu. This makes a few other small changes as well. There are two minor style changes to increase style consistency. First, it changes the titles of the two commands that the rust analyzer extension will contribute to the context menu to title case. All standard VS Code commands that appear in the context menu are in title case. Second, it shortens the title of the `openDocs` command from `Open docs under cursor` to `Open Docs`. The implicit assumption in the standard VS Code context menu command titles is that the action applies to the symbol under the cursor: `Go to Definition`, `Find All References`, etc. Note that since these are changes to the command titles, rather than the command names themselves, these changes will not break any users' existing keybindings for these commands. Second, this adds further restrictions to the `where` clauses of the two commands that the rust analyzer extension will contribute to the context menu, so that the two commands will appear in the context menu only when in a Rust project **and** within a Rust file. Say you have a Python or bash script inside your Rust project. Having these commands appear in the context menu when you right click a symbol in such a non-Rust file is extraneous and potentially confusing. ![demonstration](https://user-images.githubusercontent.com/6609145/219976062-b46ab21b-5753-48f5-a1da-562566cae71c.gif)
Configuration menu - View commit details
-
Copy full SHA for f5401f6 - Browse repository at this point
Copy the full SHA f5401f6View commit details
Commits on Feb 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cf0c8fe - Browse repository at this point
Copy the full SHA cf0c8feView commit details -
Auto merge of rust-lang#14202 - lowr:minor/use-either-either, r=lnicola
minor: import `Either` from `either` This is a clean-up patch to replace `use itertools::Either` with `use either::Either` for the sake of consistency.
Configuration menu - View commit details
-
Copy full SHA for 9a4efb4 - Browse repository at this point
Copy the full SHA 9a4efb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44e47fe - Browse repository at this point
Copy the full SHA 44e47feView commit details -
Auto merge of rust-lang#14203 - shilangyu:fix/angled-path-segments, r…
…=lnicola fix: Add check for extra path segments after a fully qualified one `type A = <()>;` is parsed just fine by rust-analyzer, but then rejected by rustc: ``` error: expected `::`, found `;` --> x.rs:7:14 | 7 | type A = <()>; | ^ expected `::` ``` Fixed by adding a lookahead for the `::` token after fully-qualified path segments.
Configuration menu - View commit details
-
Copy full SHA for 289208b - Browse repository at this point
Copy the full SHA 289208bView commit details
Commits on Feb 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e4b184a - Browse repository at this point
Copy the full SHA e4b184aView commit details -
Configuration menu - View commit details
-
Copy full SHA for aa87764 - Browse repository at this point
Copy the full SHA aa87764View commit details -
Auto merge of rust-lang#14207 - tomokinat:master, r=lnicola
Respect $CARGO_HOME when looking up toolchains. Some people set `$CARGO_HOME` to a location other than `~/.cargo` (`$XDG_DATA_DIR/cargo`, in my case), and I'd be a little nicer if the rust-analyzer extension and server respect that value when looking up toolchains, instead of having us configure all of `$CARGO`, `$RUSTC` ... manually. The new implementation still defaults to `~/.cargo` if `$CARGO_HOME` is unset, pretty much like cargo itself does (as documented in https://doc.rust-lang.org/cargo/guide/cargo-home.html), so the change is backwards compatible for most people except those who has configured `$CARGO_HOME` explicitly. I considered using https://crates.io/crates/home as suggested by https://doc.rust-lang.org/cargo/guide/cargo-home.html, but decided to put int on hold because i) we need mirror impl in node, ii) I thought the consistency matters more and iii) the new implementation shouldn't be worse than the current one (i.e. switching to `home` improvement is rather orthogonal and could be done in another PR). If you have any directions on this, please let me know.
Configuration menu - View commit details
-
Copy full SHA for 4e29820 - Browse repository at this point
Copy the full SHA 4e29820View commit details
Commits on Feb 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9a481d1 - Browse repository at this point
Copy the full SHA 9a481d1View commit details -
Auto merge of rust-lang#14208 - Kohei316:master, r=Veykril
fix:add a case in which remainig is None in resolveing types when resolving hir path. fix rust-lang#14030 The variable type is being determined incorrectly This PR fixed a problem in which `go to definition` is jumping to the incorrect position because it was failing to resolve the type in case it defined in the module when resolving hir. In addition, I added a test for this issue and refactored the related code. This is my first PR and I am using a translation tool to write this text. Let me know if you have any problems.
Configuration menu - View commit details
-
Copy full SHA for 2e47915 - Browse repository at this point
Copy the full SHA 2e47915View commit details -
Configuration menu - View commit details
-
Copy full SHA for 832f8bf - Browse repository at this point
Copy the full SHA 832f8bfView commit details -
Auto merge of rust-lang#14213 - swarnimarun:raw-ptr-ty, r=Veykril
add: clean api to get `raw_ptr` type There doesn't seem to be an API to fetch the type of `raw_ptr`, which is helpful for a project I work on. Notes: - I am unsure about the function name, do let me know if I should use something else. - Also unsure about where to add tests, for hir changes. Will fix it as needed.
Configuration menu - View commit details
-
Copy full SHA for b38fcde - Browse repository at this point
Copy the full SHA b38fcdeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e5fa74 - Browse repository at this point
Copy the full SHA 9e5fa74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29a4453 - Browse repository at this point
Copy the full SHA 29a4453View commit details -
Auto merge of rust-lang#14216 - Veykril:simplify, r=Veykril
minor: Simplify
Configuration menu - View commit details
-
Copy full SHA for c867cbf - Browse repository at this point
Copy the full SHA c867cbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9942cc4 - Browse repository at this point
Copy the full SHA 9942cc4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8bc75c4 - Browse repository at this point
Copy the full SHA 8bc75c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9957bb3 - Browse repository at this point
Copy the full SHA 9957bb3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ee2e46 - Browse repository at this point
Copy the full SHA 4ee2e46View commit details -
Add const to doctest runnable definition
Refactor method to get type parameters to add const parameters Remove unused methods
Configuration menu - View commit details
-
Copy full SHA for 7abcc7d - Browse repository at this point
Copy the full SHA 7abcc7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f494d11 - Browse repository at this point
Copy the full SHA f494d11View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd67589 - Browse repository at this point
Copy the full SHA cd67589View commit details
Commits on Feb 28, 2023
-
Auto merge of rust-lang#14040 - HKalbasi:mir, r=HKalbasi
Beginning of MIR This pull request introduces the initial implementation of MIR lowering and interpreting in Rust Analyzer. The implementation of MIR has potential to bring several benefits: - Executing a unit test without compiling it: This is my main goal. It can be useful for quickly testing code changes and print-debugging unit tests without the need for a full compilation (ideally in almost zero time, similar to languages like python and js). There is a probability that it goes nowhere, it might become slower than rustc, or it might need some unreasonable amount of memory, or we may fail to support a common pattern/function that make it unusable for most of the codes. - Constant evaluation: MIR allows for easier and more correct constant evaluation, on par with rustc. If r-a wants to fully support the type system, it needs full const eval, which means arbitrary code execution, which needs MIR or something similar. - Supporting more diagnostics: MIR can be used to detect errors, most famously borrow checker and lifetime errors, but also mutability errors and uninitialized variables, which can be difficult/impossible to detect in HIR. - Lowering closures: With MIR we can find out closure capture modes, which is useful in detecting if a closure implements the `FnMut` or `Fn` traits, and calculating its size and data layout. But the current PR implements no diagnostics and doesn't support closures. About const eval, I removed the old const eval code and it now uses the mir interpreter. Everything that is supported in stable rustc is either implemented or is super easy to implement. About interpreting unit tests, I added an experimental config, disabled by default, that shows a `pass` or `fail` on hover of unit tests (ideally it should be a button similar to `Run test` button, but I didn't figured out how to add them). Currently, no real world test works, due to missing features including closures, heap allocation, `dyn Trait` and ... so at this point it is only useful for me selecting what to implement next. The implementation of MIR is based on the design of rustc, the data structures are almost copy paste (so it should be easy to migrate it to a possible future stable-mir), but the lowering and interpreting code is from me.
Configuration menu - View commit details
-
Copy full SHA for a0be16b - Browse repository at this point
Copy the full SHA a0be16bView commit details -
Configuration menu - View commit details
-
Copy full SHA for af79491 - Browse repository at this point
Copy the full SHA af79491View commit details -
Auto merge of rust-lang#14185 - anergictcell:fix_14142, r=HKalbasi
Fix: Run doctests for structs with lifetime parameters from IDE Fixes rust-lang#14142: Doctests can't be triggered for structs with lifetimes This MR adds lifetime parameters to the structs path for runnables so that they can be triggered from an IDE as well. This is my first MR for rust-analyzer, please let me know if I should change something, either in code or the description here.
Configuration menu - View commit details
-
Copy full SHA for c386316 - Browse repository at this point
Copy the full SHA c386316View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47a567b - Browse repository at this point
Copy the full SHA 47a567bView commit details -
Auto merge of rust-lang#14218 - Veykril:root-dedup, r=Veykril
Deduplicate source roots that have overlapping include paths Fixes flycheck not working for the rustc workspace when using `linkedProjects`
Configuration menu - View commit details
-
Copy full SHA for 1d07c5b - Browse repository at this point
Copy the full SHA 1d07c5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b5a1ddf - Browse repository at this point
Copy the full SHA b5a1ddfView commit details -
Auto merge of rust-lang#14220 - lowr:fix/ci-pointer-offset-is-unstabl…
…e, r=lnicola minor: Don't use unstable `pointer` link Our CI is failing because rustdoc is complaining we're using [unstable](rust-lang#80896) `pointer` link.
Configuration menu - View commit details
-
Copy full SHA for 7f01ae8 - Browse repository at this point
Copy the full SHA 7f01ae8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f64fe66 - Browse repository at this point
Copy the full SHA f64fe66View commit details
Commits on Mar 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for de4a896 - Browse repository at this point
Copy the full SHA de4a896View commit details -
Auto merge of rust-lang#14225 - lowr:patch/remove-nested-dbg, r=Veykril
Support removing nested `dbg!()`s in `remove_dbg` Closes rust-lang#13901
Configuration menu - View commit details
-
Copy full SHA for d1fd635 - Browse repository at this point
Copy the full SHA d1fd635View commit details -
Auto merge of rust-lang#14223 - HKalbasi:mir, r=HKalbasi
Add tuple to render_const_scalar cc `@lowr`
Configuration menu - View commit details
-
Copy full SHA for ef9d5db - Browse repository at this point
Copy the full SHA ef9d5dbView commit details -
Auto merge of rust-lang#14176 - lowr:fix/assoc-func-vis-in-local-impl…
…, r=Veykril Fix associated item visibility in block-local impls Fixes rust-lang#14046 When we're resolving visibility of block-local items... > `self` normally refers to the containing non-block module, and `super` to its parent (etc.). However, visibilities must only refer to a module in the DefMap they're written in, so we restrict them when that happens. ([link]) ...unless we're resolving visibility of associated items in block-local impls, because that impl is semantically "hoisted" to the nearest (non-block) module. With this PR, we skip the adjustment for such items. Since visibility representation of those items is modified, this PR also adjusts visibility rendering in `HirDisplay`. [link]: https://github.com/rust-lang/rust-analyzer/blob/a6603fc21d50b3386a488c96225b2d1fd492e533/crates/hir-def/src/nameres/path_resolution.rs#L101-L103
Configuration menu - View commit details
-
Copy full SHA for 32424d0 - Browse repository at this point
Copy the full SHA 32424d0View commit details
Commits on Mar 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 88f2abb - Browse repository at this point
Copy the full SHA 88f2abbView commit details -
Auto merge of rust-lang#14234 - Veykril:rustc-crate-check, r=Veykril
Don't drop rustc crates in the rustc workspace Turns out the rustc workspace has tools that rely on the external crates themselves so this check is faulty
Configuration menu - View commit details
-
Copy full SHA for 9b441b9 - Browse repository at this point
Copy the full SHA 9b441b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 943de55 - Browse repository at this point
Copy the full SHA 943de55View commit details
Commits on Mar 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bda2af7 - Browse repository at this point
Copy the full SHA bda2af7View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc2b395 - Browse repository at this point
Copy the full SHA fc2b395View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec273c3 - Browse repository at this point
Copy the full SHA ec273c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44e2c6e - Browse repository at this point
Copy the full SHA 44e2c6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 522823f - Browse repository at this point
Copy the full SHA 522823fView commit details -
Auto merge of rust-lang#14238 - lowr:feat/allow-generate-fn-across-lo…
…cal-crates, r=Veykril feat: allow `generate_function` to generate in different local crate Closes rust-lang#14224 This PR allows `generate_function` assist to generate in crates other than the current one. I took a step further from the original request and made it allow to generate in any local crates since it looked reasonable and IDE layer doesn't really know about packages. (actually we have been checking which crate we're generating in only for methods and not for freestanding functions, so we were providing the assist for `std::foo$0()`; it's both feature and fix in a sense) The first commit is a drive-by fix unrelated to the feature.
Configuration menu - View commit details
-
Copy full SHA for 3b857e1 - Browse repository at this point
Copy the full SHA 3b857e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80ddfb8 - Browse repository at this point
Copy the full SHA 80ddfb8View commit details -
Auto merge of rust-lang#14222 - Veykril:pat-mismatch-diags, r=Veykril
Show pattern mismatch diagnostics
Configuration menu - View commit details
-
Copy full SHA for c229a83 - Browse repository at this point
Copy the full SHA c229a83View commit details -
Auto merge of rust-lang#14239 - Veykril:sysroot-cli, r=Veykril
fix: Load the sysroot in all CLI commands
Configuration menu - View commit details
-
Copy full SHA for a8d3c46 - Browse repository at this point
Copy the full SHA a8d3c46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e7d2c2 - Browse repository at this point
Copy the full SHA 2e7d2c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 356d12e - Browse repository at this point
Copy the full SHA 356d12eView commit details -
Refactor generic parameter lowering
Since we moved impl trait handling to other place, there are only two cases now: those that introduce implicit `Self` parameter and those that don't.
Configuration menu - View commit details
-
Copy full SHA for e2ec3a6 - Browse repository at this point
Copy the full SHA e2ec3a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29c957f - Browse repository at this point
Copy the full SHA 29c957fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8eac19 - Browse repository at this point
Copy the full SHA f8eac19View commit details -
Auto merge of rust-lang#14184 - lowr:feat/trait-alias-def, r=Veykril
Handle trait alias definitions Part of rust-lang#2773 This PR adds a bunch of structs and enum variants for trait aliases. Trait aliases should be handled as an independent item because they are semantically distinct from traits. I basically started by adding `TraitAlias{Id, Loc}` to `hir_def::item_tree` and iterated adding necessary stuffs until compiler stopped complaining what's missing. Let me know if there's still anything I need to add. I'm opening up this PR for early review and stuff. I'm planning to add tests for IDE functionalities in this PR, but not type-related support, for which I put FIXME notes.
Configuration menu - View commit details
-
Copy full SHA for 6756294 - Browse repository at this point
Copy the full SHA 6756294View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02eb2d7 - Browse repository at this point
Copy the full SHA 02eb2d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41f234d - Browse repository at this point
Copy the full SHA 41f234dView commit details -
Auto merge of rust-lang#14240 - Veykril:coerce-many, r=Veykril
Diagnose value breaks in incorrect breakables
Configuration menu - View commit details
-
Copy full SHA for 3ba876a - Browse repository at this point
Copy the full SHA 3ba876aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c7a0aa - Browse repository at this point
Copy the full SHA 3c7a0aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78b2dd8 - Browse repository at this point
Copy the full SHA 78b2dd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7485a0 - Browse repository at this point
Copy the full SHA e7485a0View commit details -
Auto merge of rust-lang#14243 - Veykril:inference-diags, r=Veykril
feat: Diagnose unresolved field, method call and call expression
Configuration menu - View commit details
-
Copy full SHA for 7c092a1 - Browse repository at this point
Copy the full SHA 7c092a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c12fac6 - Browse repository at this point
Copy the full SHA c12fac6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29150c2 - Browse repository at this point
Copy the full SHA 29150c2View commit details -
Auto merge of rust-lang#14245 - Veykril:pat-diags, r=Veykril
Disable pattern type mismatches again We have too many false mismatches at the moment for these to be enabled cc rust-lang/rust-analyzer#14222
Configuration menu - View commit details
-
Copy full SHA for 73e2505 - Browse repository at this point
Copy the full SHA 73e2505View commit details
Commits on Mar 4, 2023
-
generate correct completion edits for missing macro arguments
rust-analyzer used the token at the cursor after macro expansion to decide whether to replace the token at the cursor before macro expansion. In most cases these two are the same but in some cases these can mismatch which can lead to incorrect replacements. For example if an ident/expr macro argument is missing rust-analyzer generates a "missing" identifier as a placeholder, there is only a brace at the cursor. Therefore, rust-analyzer will incorrectly replace the macro brace with the completion in that case leading to rust-lang#14246. Using the expanded token type was intentional. However, this doesn't seem to ever be desirable (this is supported by the fact that there were no tests that relied on this behavior) since the type of edit to perform should always be determined by the token it's actually applied to.
Configuration menu - View commit details
-
Copy full SHA for 2e465d1 - Browse repository at this point
Copy the full SHA 2e465d1View commit details -
Auto merge of rust-lang#14247 - pascalkuthe:master, r=Veykril
generate correct completion edits for missing macro arguments Fixes rust-lang#14246 rust-analyzer used the token at the cursor after macro expansion to decide whether to replace the token at the cursor before macro expansion. In most cases these two are the same but in some cases these can mismatch which can lead to incorrect replacements. For example if an ident/expr macro argument is missing rust-analyzer generates a "missing" identifier as a placeholder, there is only a brace at the cursor. Therefore, rust-analyzer will incorrectly replace the macro brace with the completion in that case leading to rust-lang#14246. Using the expanded token type was intentional. However, this doesn't seem to ever be desirable (this is supported by the fact that there were no tests that relied on this behavior) since the type of edit to perform should always be determined by the token it's actually applied to. Therefore this PR simply switches the relevant match to use the unexpanded token instead
Configuration menu - View commit details
-
Copy full SHA for 4b330f5 - Browse repository at this point
Copy the full SHA 4b330f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 800ab65 - Browse repository at this point
Copy the full SHA 800ab65View commit details -
Auto merge of rust-lang#14244 - Veykril:metrics, r=lnicola
internal: Report type metrics for patterns ``` ❯ cargo run --release -p rust-analyzer -q analysis-stats --memory-usage . Database loaded: 2.09s, 218mb (metadata 275.07ms, 21mb; build 1.29s, 504kb) crates: 44, mods: 916, decls: 19582, fns: 14631 Item Collection: 14.33s, 472mb exprs: 420422, ??ty: 68 (0%), ?ty: 141 (0%), !ty: 1 pats: 82968, ??ty: 11 (0%), ?ty: 10 (0%), !ty: 178 Inference: 47.84s, 745mb Total: 62.16s, 1217mb ``` We currently have 178 mismatches on r-a itself
Configuration menu - View commit details
-
Copy full SHA for 5efcfe5 - Browse repository at this point
Copy the full SHA 5efcfe5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 24ba1be - Browse repository at this point
Copy the full SHA 24ba1beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b5bc83 - Browse repository at this point
Copy the full SHA 1b5bc83View commit details -
Configuration menu - View commit details
-
Copy full SHA for b827648 - Browse repository at this point
Copy the full SHA b827648View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95c4cb9 - Browse repository at this point
Copy the full SHA 95c4cb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b85e2af - Browse repository at this point
Copy the full SHA b85e2afView commit details -
Auto merge of rust-lang#14251 - Veykril:ty-expr-stmt, r=Veykril
internal: Set expectation for no-semi expression statements to unit
Configuration menu - View commit details
-
Copy full SHA for 94dc7a3 - Browse repository at this point
Copy the full SHA 94dc7a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a91f01 - Browse repository at this point
Copy the full SHA 5a91f01View commit details -
Auto merge of rust-lang#14252 - Veykril:field-mcall-fallback, r=Veykril
internal: Handle fields called as method calls as the fields they resolve to Confusing PR title tbf but this makes it so `bar` in `foo.bar()` resolves to the field if it exists and no method with the same name exists. Improves UX slightly when incorrectly calling a field.
Configuration menu - View commit details
-
Copy full SHA for e6ba791 - Browse repository at this point
Copy the full SHA e6ba791View commit details
Commits on Mar 5, 2023
-
Auto merge of rust-lang#101550 - CraftSpider:link-dead-windows, r=wes…
…leywiser Make compressed rmeta contain compressed data length after header Fixes rust-lang#90056, which is caused by link.exe introducing padding to the `.rustc` section, since it assumes this will have no effect besides allowing it to possibly use the extra space in future links.
Configuration menu - View commit details
-
Copy full SHA for 15b867b - Browse repository at this point
Copy the full SHA 15b867bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae8ce99 - Browse repository at this point
Copy the full SHA ae8ce99View commit details -
Re-use the resolver in InferenceContext instead of rebuilding it on e…
…very expression change
Configuration menu - View commit details
-
Copy full SHA for a8606e5 - Browse repository at this point
Copy the full SHA a8606e5View commit details -
Allocate traits in scope upfront when type checking instead of recoll…
…ecting them everytime
Configuration menu - View commit details
-
Copy full SHA for a51267c - Browse repository at this point
Copy the full SHA a51267cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27fad2a - Browse repository at this point
Copy the full SHA 27fad2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d8b1ec6 - Browse repository at this point
Copy the full SHA d8b1ec6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7be48ac - Browse repository at this point
Copy the full SHA 7be48acView commit details -
Auto merge of rust-lang#14255 - HKalbasi:const-hex, r=HKalbasi
Bring back the hex in const hover
Configuration menu - View commit details
-
Copy full SHA for 0a956ec - Browse repository at this point
Copy the full SHA 0a956ecView commit details
Commits on Mar 6, 2023
-
Auto merge of rust-lang#14260 - Veykril:if-let-match-adjust, r=Veykril
fix: Adjust `replace_match_with_if_let` applicability range It currently trigger in the entirety of match which is less than ideal
Configuration menu - View commit details
-
Copy full SHA for 900efbe - Browse repository at this point
Copy the full SHA 900efbeView commit details -
Auto merge of rust-lang#14261 - Veykril:ty-perf, r=Veykril
internal: Re-use the resolver in `InferenceContext` instead of rebuilding it whenever needed This reduced inference time on my local build by roughly ~1 sec (out of like 60)
Configuration menu - View commit details
-
Copy full SHA for a360fab - Browse repository at this point
Copy the full SHA a360fabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61ad6a9 - Browse repository at this point
Copy the full SHA 61ad6a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0a0664 - Browse repository at this point
Copy the full SHA c0a0664View commit details -
Configuration menu - View commit details
-
Copy full SHA for a25710b - Browse repository at this point
Copy the full SHA a25710bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac04bfd - Browse repository at this point
Copy the full SHA ac04bfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6377d50 - Browse repository at this point
Copy the full SHA 6377d50View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf0f99f - Browse repository at this point
Copy the full SHA bf0f99fView commit details -
Configuration menu - View commit details
-
Copy full SHA for af90ec8 - Browse repository at this point
Copy the full SHA af90ec8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2cce9dc - Browse repository at this point
Copy the full SHA 2cce9dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 199bc82 - Browse repository at this point
Copy the full SHA 199bc82View commit details -
internal: Mark unresolved field, unresolved method and expected funct…
…ion diagnostics experimental
Configuration menu - View commit details
-
Copy full SHA for 34a3187 - Browse repository at this point
Copy the full SHA 34a3187View commit details -
Auto merge of rust-lang#14267 - Veykril:experimental-diagnostics, r=V…
…eykril internal: Mark unresolved field, unresolved method and expected function diagnostics experimental Our type checking is still not good enough for us to have these diagnostics be enabled by default it seems so let's mark them as experimental for now.
Configuration menu - View commit details
-
Copy full SHA for 1bfe96e - Browse repository at this point
Copy the full SHA 1bfe96eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ce0608 - Browse repository at this point
Copy the full SHA 0ce0608View commit details -
Auto merge of rust-lang#14266 - Veykril:generalize-eager-lazy, r=Veykril
feature: Make replace_or_with_or_else assists more generally applicable
Configuration menu - View commit details
-
Copy full SHA for 31c12ec - Browse repository at this point
Copy the full SHA 31c12ecView commit details
Commits on Mar 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 995aacf - Browse repository at this point
Copy the full SHA 995aacfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 98990af - Browse repository at this point
Copy the full SHA 98990afView commit details -
Configuration menu - View commit details
-
Copy full SHA for bcd7ecb - Browse repository at this point
Copy the full SHA bcd7ecbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e97527 - Browse repository at this point
Copy the full SHA 6e97527View commit details -
Auto merge of rust-lang#14232 - HKalbasi:mir, r=Veykril
MIR episode 2 This PR adds: 1. `need-mut` and `unused-mut` diagnostics 2. `View mir` command which shows MIR for the body under cursor, useful for debugging 3. MIR lowering for or-patterns and for-loops
Configuration menu - View commit details
-
Copy full SHA for 44ff3c4 - Browse repository at this point
Copy the full SHA 44ff3c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for d45708f - Browse repository at this point
Copy the full SHA d45708fView commit details -
Auto merge of rust-lang#14271 - Veykril:ty-diag-err, r=Veykril
Don't trigger unresolved method/field diagnostics on types containing errors
Configuration menu - View commit details
-
Copy full SHA for ecc32c2 - Browse repository at this point
Copy the full SHA ecc32c2View commit details
Commits on Mar 8, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c978648 - Browse repository at this point
Copy the full SHA c978648View commit details -
Auto merge of rust-lang#14248 - XFFXFF:let_else_right_curly_brace, r=…
…Veykril fix: show diagnostic for } token followed by else in let else statement fix rust-lang#14221 My thinking is to check if the `expr` after `=` is block like when parse `let ... lese` , and if so, emit error.
Configuration menu - View commit details
-
Copy full SHA for a9d97b6 - Browse repository at this point
Copy the full SHA a9d97b6View commit details -
Auto merge of rust-lang#14282 - Veykril:rustc_private-proc-macro, r=V…
…eykril fix: Load proc-macros for rustc_private crates Fixes rust-lang/rust-analyzer#13591 Verified that this makes things work in the clippy repo (like resolving `sym` things for example)
Configuration menu - View commit details
-
Copy full SHA for aff6cb0 - Browse repository at this point
Copy the full SHA aff6cb0View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4bd27b - Browse repository at this point
Copy the full SHA b4bd27bView commit details -
Auto merge of rust-lang#14283 - Veykril:error-notifs, r=Veykril
Load proc-macros for rustc_private crates If the client support our server status notification there is no need to show the pop up for workspace fetching failures since that's already going to be shown in the status. cc rust-lang/rust-analyzer#14193
Configuration menu - View commit details
-
Copy full SHA for 6ebbd48 - Browse repository at this point
Copy the full SHA 6ebbd48View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6e7cf3 - Browse repository at this point
Copy the full SHA b6e7cf3View commit details -
Auto merge of rust-lang#14284 - Veykril:sem-derive-unresolved, r=Veykril
fix: Highlight unresolved derives as being unresolved Fixes rust-lang/rust-analyzer#11350
Configuration menu - View commit details
-
Copy full SHA for c951093 - Browse repository at this point
Copy the full SHA c951093View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf47c15 - Browse repository at this point
Copy the full SHA cf47c15View commit details -
Auto merge of rust-lang#14285 - HKalbasi:mir, r=Veykril
Evaluate consts in `path_to_const` fix rust-lang#14275
Configuration menu - View commit details
-
Copy full SHA for db64f3a - Browse repository at this point
Copy the full SHA db64f3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d038892 - Browse repository at this point
Copy the full SHA d038892View commit details -
Auto merge of rust-lang#14286 - Veykril:block-def-tail-mac, r=Veykril
fix: Fix block defmap not looking into tail expressions for macro calls Fixes rust-lang/rust-analyzer#14263
Configuration menu - View commit details
-
Copy full SHA for 3d904e0 - Browse repository at this point
Copy the full SHA 3d904e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ee2aba - Browse repository at this point
Copy the full SHA 4ee2abaView commit details -
Auto merge of rust-lang#14287 - Veykril:rustc_private-proc-macro, r=V…
…eykril minor: Fixup dylib extensions for rustc_private proc-macro loading Follow up to rust-lang/rust-analyzer#14282
Configuration menu - View commit details
-
Copy full SHA for 38e9a11 - Browse repository at this point
Copy the full SHA 38e9a11View commit details -
Configuration menu - View commit details
-
Copy full SHA for 811190b - Browse repository at this point
Copy the full SHA 811190bView commit details
Commits on Mar 9, 2023
-
Auto merge of rust-lang#14291 - HKalbasi:master, r=HKalbasi
fix multiple definition binding in match to let-else fix rust-lang#14290
Configuration menu - View commit details
-
Copy full SHA for 8e404f4 - Browse repository at this point
Copy the full SHA 8e404f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8c80e7 - Browse repository at this point
Copy the full SHA d8c80e7View commit details -
Auto merge of rust-lang#14297 - Veykril:proc-macro-deps, r=Veykril
Add core lib to proc_macro dependencies Fixes rust-lang/rust-analyzer#14292
Configuration menu - View commit details
-
Copy full SHA for a738737 - Browse repository at this point
Copy the full SHA a738737View commit details -
Configuration menu - View commit details
-
Copy full SHA for e158dc7 - Browse repository at this point
Copy the full SHA e158dc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3427d36 - Browse repository at this point
Copy the full SHA 3427d36View commit details -
Auto merge of rust-lang#14299 - Veykril:local-search, r=Veykril
fix: Fix search not searching bodies of attributed items Closes rust-lang/rust-analyzer#14229
Configuration menu - View commit details
-
Copy full SHA for de3b12d - Browse repository at this point
Copy the full SHA de3b12dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 879cac4 - Browse repository at this point
Copy the full SHA 879cac4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 209cf7d - Browse repository at this point
Copy the full SHA 209cf7dView commit details -
Auto merge of rust-lang#14300 - lnicola:rustc-flycheck, r=lnicola
fix: Watch both stdout and stderr in flycheck Fixes rust-lang#14217 This isn't great because it un-mixes the messages from the two streams, but maybe it's not such a big problem?
Configuration menu - View commit details
-
Copy full SHA for 10a652a - Browse repository at this point
Copy the full SHA 10a652aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c49f753 - Browse repository at this point
Copy the full SHA c49f753View commit details -
Auto merge of rust-lang#14302 - Veykril:db-memory-usage, r=Veykril
internal: Add missing queries to per_query_memory_usage
Configuration menu - View commit details
-
Copy full SHA for 8ce5a53 - Browse repository at this point
Copy the full SHA 8ce5a53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8593132 - Browse repository at this point
Copy the full SHA 8593132View commit details -
Auto merge of rust-lang#14306 - HKalbasi:master, r=HKalbasi
fix block with no termination in or patterns fix rust-lang#14298
Configuration menu - View commit details
-
Copy full SHA for 14b9d18 - Browse repository at this point
Copy the full SHA 14b9d18View commit details
Commits on Mar 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 116775b - Browse repository at this point
Copy the full SHA 116775bView commit details -
Auto merge of rust-lang#14311 - Veykril:lib-diags, r=Veykril
internal: Don't attempt to calculate diagnostics in library crates We already filtered these later on, but we might as well stop calculating them alltogether. This way we also show cargo diagnostics that occur outside of the workspace which can happen when something goes very wrong (and which usually then causes no check diagnostics to appear in the workspace at all)
Configuration menu - View commit details
-
Copy full SHA for 552aea5 - Browse repository at this point
Copy the full SHA 552aea5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 71e1c02 - Browse repository at this point
Copy the full SHA 71e1c02View commit details -
Auto merge of rust-lang#14312 - HKalbasi:master, r=lnicola
Revert rust-lang#14285 fix rust-lang#14305
Configuration menu - View commit details
-
Copy full SHA for 1b5bba4 - Browse repository at this point
Copy the full SHA 1b5bba4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d19ccb - Browse repository at this point
Copy the full SHA 0d19ccbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2cb6034 - Browse repository at this point
Copy the full SHA 2cb6034View commit details -
Configuration menu - View commit details
-
Copy full SHA for c03775e - Browse repository at this point
Copy the full SHA c03775eView commit details -
Auto merge of rust-lang#14313 - Veykril:notifs, r=Veykril
Make project loading errors less intrusive cc rust-lang/rust-analyzer#14193 closes rust-lang/rust-analyzer#9909 ![image](https://user-images.githubusercontent.com/3757771/224274817-a5a8cb0c-7bda-454d-9772-5f839f360b9a.png)
Configuration menu - View commit details
-
Copy full SHA for 070f8f8 - Browse repository at this point
Copy the full SHA 070f8f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a980b56 - Browse repository at this point
Copy the full SHA a980b56View commit details -
Auto merge of rust-lang#14316 - HKalbasi:master, r=HKalbasi
Fix stack overflow when derefrencing `&!` fix rust-lang#14310
Configuration menu - View commit details
-
Copy full SHA for 9fca0a4 - Browse repository at this point
Copy the full SHA 9fca0a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for c38aa5f - Browse repository at this point
Copy the full SHA c38aa5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f189f6 - Browse repository at this point
Copy the full SHA 8f189f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e8c586 - Browse repository at this point
Copy the full SHA 5e8c586View commit details -
Configuration menu - View commit details
-
Copy full SHA for 17b9d35 - Browse repository at this point
Copy the full SHA 17b9d35View commit details
Commits on Mar 11, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2691143 - Browse repository at this point
Copy the full SHA 2691143View commit details -
Auto merge of rust-lang#14323 - ComputerDruid:fix_overlap_indexes, r=…
…Veykril Fix overlap deduping infinite loop Fixes: rust-lang#14276
Configuration menu - View commit details
-
Copy full SHA for 6d42e75 - Browse repository at this point
Copy the full SHA 6d42e75View commit details -
Auto merge of rust-lang#14326 - iDawer:refactor, r=Veykril
internal: Rename `hir::diagnostics::MissingMatchArms.match_expr` field `hir::diagnostics::MissingMatchArms.match_expr` had confusing name: it is pointing to scrutinee expression. Renamed to `scrutinee_expr` and used better fitting type for it. Also small refactorings/cleanup.
Configuration menu - View commit details
-
Copy full SHA for 70e10de - Browse repository at this point
Copy the full SHA 70e10deView commit details -
Configuration menu - View commit details
-
Copy full SHA for cfc9d5c - Browse repository at this point
Copy the full SHA cfc9d5cView commit details
Commits on Mar 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c3864eb - Browse repository at this point
Copy the full SHA c3864ebView commit details -
Auto merge of rust-lang#14328 - lnicola:build-scripts-extra-args, r=V…
…eykril fix: Pass flycheck extra args when running build scripts Closes rust-lang#14315 Not sure if we want to do it like this or to add an extra config key, though.
Configuration menu - View commit details
-
Copy full SHA for f1e51af - Browse repository at this point
Copy the full SHA f1e51afView commit details
Commits on Mar 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bdbd2a5 - Browse repository at this point
Copy the full SHA bdbd2a5View commit details -
Auto merge of rust-lang#14333 - lnicola:sync-from-rust, r=lnicola
minor: sync from downstream
Configuration menu - View commit details
-
Copy full SHA for 9549753 - Browse repository at this point
Copy the full SHA 9549753View commit details -
Configuration menu - View commit details
-
Copy full SHA for e862901 - Browse repository at this point
Copy the full SHA e862901View commit details