-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #104211
Merged
Merged
⬆️ rust-analyzer #104211
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fix: remove unused import
fix) update broken links in guide.md Hi, I Just fixed some broken links in `guide.md`. In most cases, it is not connected by an old version (expecially `guide-2019-01`) of the link, so I made some modifications. Thanks for your time :)
…=lnicola fix: disregard type variable expectation for if expressions Fixes rust-lang#13522 As [the comment](https://github.com/rust-lang/rust-analyzer/blob/8142d1f606dc2e52b1d2b8992671e2bd73379f28/crates/hir-ty/src/infer.rs#L1087-L1090) on `Expectation::adjust_for_branches` explains: > If the expected type is just a type variable, then don't use an expected type. Otherwise, we might write parts of the type when checking the 'then' block which are incompatible with the 'else' branch. Note that we already use it in match expressions. I've added tests for them too nevertheless.
This reverts commit 319611b.
…assist, r=jonas-schievink Add `Convert match to let-else` assist Closes rust-lang/rust-analyzer#13254
fix: async trait method for `unnecessary_async` Fix rust-lang/rust-analyzer#13492
…e, r=jonas-schievink feat: show signature help when calling generic types implementing `FnOnce` This queries chalk for the `FnOnce` impl of callees and takes argument and return types from there, making generic `Callable`s available to the IDE. This makes signature help work for them, and potentially allows other features to take generic callables into account in the future.
fix: make custom expr prefix completions to understand refs Possible fix of rust-lang#7929 While reviewing the postfix completion code I saw that while calling `add_custom_postfix_completions` we were doing it under the part where reference was not taken into consideration, but as we are only adding postfix completions with `Expr` scope ( [source](https://github.com/rust-lang/rust-analyzer/blob/ba28e19b7838e3ad4223ae82d074dc3950ef1548/crates/ide-completion/src/completions/postfix.rs#L272) ) I shifted the `add_custom_postfix_completions` call to part where references are considered I am not sure if this is the correct fix or I am understanding the problem exactly but this small move seemed to have fixed the issue :)
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
…kril feat: add config for inserting must_use in `generate_enum_as_method` Should fix rust-lang#13312 Didn't add a test because I was not sure on how to add test for a specific configuration option, tried to look for the usages for other `AssistConfig` variants but couldn't find any in `tests`. If there is a way to test this, do point me towards it. I tried to extract the formatting string as a common `template_string` and only have if-else for that, but it didn't compile :( Also it seems these tests are failing: ``` test config::tests::generate_config_documentation ... FAILED test config::tests::generate_package_json_config ... FAILED ``` Can you also point me to how to correct these 😅 ( I guess there is some command to automatically generate these? )
…o-guarded-return-assist, r=jonas-schievink Use let-else statements in `Convert to guarded return` assist Follow up for rust-lang/rust-analyzer#13516, addresses remaining part of rust-lang/rust-analyzer#13254 (comment)
Clarify what commands are debug commands in VSCode Renders as ![image](https://user-images.githubusercontent.com/3757771/199828895-4d7691f6-5c33-405c-9842-691b32745919.png)
Fixed local shadowing the caller's argument issue fix rust-lang/rust-analyzer#12536
fix: Fix reference searching only accounting substrings instead of whole identifiers Fixes rust-lang/rust-analyzer#13498
…apture, r=Veykril internal: Migrate `ide_assists::utils` and `ide_assists::handlers` to use format arg captures (part 1) This not only serves as making future migration to mutable syntax trees easier, it also finds out what needs to be migrated in the first place. ~~Aside from the first commit, subsequent commits are structured to only deal with one file/handler at a time.~~ This is the first of 3 PRs, migrating: Utils: - `gen_trait_fn_body` - `render_snippet` - `ReferenceConversion` - `convert_type` - `getter` Handlers: - `add_explicit_type` - `add_return_type` - `add_turbo_fish` - `apply_demorgan` - `auto_import` - `convert_comment_block` - `convert_integer_literal` - `convert_into_to_from` - `convert_iter_for_each_to_for` - `convert_let_else_to_match` - `convert_tuple_struct_to_named_struct` - `convert_two_arm_bool_match_to_matches_macro` - `destructure_tuple_binding` - `extract_function` - `extract_module` - `extract_struct_from_enum_variant` - `extract_type_alias` - `extract_variable` - `fix_visibility`
…re-pt3, r=Veykril Migrate assists to format args captures, part 3 Continuation of rust-lang/rust-analyzer#13379 Migrates: - `inline_call` - `inline_local_variable` - `introduce_named_lifetime` - `merge_match_arms` - `move_from_mod_rs` - `move_guard` - `move_module_to_file` - `move_to_mod_rs` - `number_representation` - `qualify_method_call` - `qualify_path` - `raw_string` - `remove_dbg` - `replace_derive_with_manual_impl` - `replace_or_with_or_else` - `replace_turbofish_with_explicit_type` - `unwrap_tuple` - `wrap_return_type_in_result`
docs: add crates section to the manual closes rust-lang#13533 Added a section to the user manual, to make it easier for users to find the correct crate.
minor: Update github issue templates
docs: fix adoc links Correct rust-lang#13536 with adoc link syntax
rustbot
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Nov 9, 2022
@bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Nov 9, 2022
notriddle
added a commit
to notriddle/rust
that referenced
this pull request
Nov 10, 2022
…r=lnicola ⬆️ rust-analyzer r? `@ghost`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 10, 2022
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#102763 (Some diagnostic-related nits) - rust-lang#103443 (Parser: Recover from using colon as path separator in imports) - rust-lang#103675 (remove redundent "<>" for ty::Slice with reference type) - rust-lang#104046 (bootstrap: add support for running Miri on a file) - rust-lang#104115 (Migrate crate-search element to CSS variables) - rust-lang#104190 (Ignore "Change InferCtxtBuilder from enter to build" in git blame) - rust-lang#104201 (Add check in GUI test for file loading failure) - rust-lang#104211 (:arrow_up: rust-analyzer) - rust-lang#104231 (Update mailmap) Failed merges: - rust-lang#104169 (Migrate `:target` rules to use CSS variables) r? `@ghost` `@rustbot` modify labels: rollup
Aaron1011
pushed a commit
to Aaron1011/rust
that referenced
this pull request
Jan 6, 2023
…r=lnicola ⬆️ rust-analyzer r? ``@ghost``
Aaron1011
pushed a commit
to Aaron1011/rust
that referenced
this pull request
Jan 6, 2023
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#102763 (Some diagnostic-related nits) - rust-lang#103443 (Parser: Recover from using colon as path separator in imports) - rust-lang#103675 (remove redundent "<>" for ty::Slice with reference type) - rust-lang#104046 (bootstrap: add support for running Miri on a file) - rust-lang#104115 (Migrate crate-search element to CSS variables) - rust-lang#104190 (Ignore "Change InferCtxtBuilder from enter to build" in git blame) - rust-lang#104201 (Add check in GUI test for file loading failure) - rust-lang#104211 (:arrow_up: rust-analyzer) - rust-lang#104231 (Update mailmap) Failed merges: - rust-lang#104169 (Migrate `:target` rules to use CSS variables) r? `@ghost` `@rustbot` modify labels: rollup
bors
pushed a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 9, 2023
…r=lnicola ⬆️ rust-analyzer r? ``@ghost``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @ghost