about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates
AgeCommit message (Collapse)AuthorLines
2024-08-29Auto merge of #17940 - ChayimFriedman2:closure-to-fn, r=Veykrilbors-13/+1511
feat: Create an assist to convert closure to freestanding fn The assist converts all captures to parameters. Closes #17920. This was more work than I though, since it has to handle a bunch of edge cases... Based on #17941. Needs to merge it first.
2024-08-29Merge from rust-lang/rustLaurențiu Nicola-2/+4
2024-08-29fix: Fix TokenStream::to_string implementation dropping quotation marksLukas Wirth-3/+8
2024-08-29fix: Fix proc-macro server crashing when parsing a non-lexable string into a ↵Lukas Wirth-3/+15
TokenStream
2024-08-29Auto merge of #17992 - Wilfred:newlines_in_logs, r=Veykrilbors-2/+2
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
2024-08-28Fix incorrect symbol definitions in SCIP outputDavid Richey-1/+3
2024-08-28internal: Add doc comments to OpQueueWilfred Hughes-0/+11
2024-08-29Consider field attributes when converting from tuple to named struct and the ↵Chayim Refael Friedman-11/+49
opposite
2024-08-29Also handle deref expressions in "Extract variable"Chayim Refael Friedman-15/+59
And BTW, remove the parentheses of the extracted expression if there are.
2024-08-28internal: Avoid newlines in fetch workspace errorsWilfred Hughes-2/+2
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
2024-08-29Don't add reference when it isn't needed for the "Extract variable" assistChayim Refael Friedman-1/+42
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.
2024-08-28Consider all expressions that autoderef in "Extract variable", not just ↵Chayim Refael Friedman-3/+48
method and field accesses.
2024-08-28Fix name resolution of shadowed builtin macroChayim Refael Friedman-1/+33
2024-08-28Minor errorsAli Bektas-2/+2
2024-08-28Remove invalid testsAli Bektas-72/+0
2024-08-28Make almost every client config globalAli Bektas-210/+211
2024-08-28Make completion_* localAli Bektas-72/+76
2024-08-28Make diagnostics_* localAli Bektas-32/+33
2024-08-28Make workspace_symbol_search_* workspaceAli Bektas-15/+15
2024-08-28Make procMacro_* workspaceAli Bektas-7/+11
2024-08-28Make rustc_* workspaceAli Bektas-11/+11
2024-08-28Make runnables workspaceAli Bektas-22/+24
2024-08-28Make check workspaceAli Bektas-85/+89
2024-08-28Make checkOnSave workspaceAli Bektas-8/+9
2024-08-28Make cargo_ workspace againAli Bektas-157/+190
2024-08-28Auto merge of #17981 - lnicola:proc-macro-cwd, r=Veykrilbors-2/+2
minor: Fix cwd used for proc macro expansion Fixes #17980.
2024-08-28Fix cwd used for proc macro expansionLaurențiu Nicola-2/+2
2024-08-27Create an assist to convert closure to freestanding fnChayim Refael Friedman-13/+1511
The assist converts all captures to parameters.
2024-08-27Auto merge of #17757 - alibektas:toggle_macro_delimiters, r=Veykrilbors-0/+279
assist: Add new assist toggle_macro_delimiter Closes #17716
2024-08-27Fix testsLukas Wirth-23/+23
2024-08-27Auto merge of #17974 - lnicola:rm-apache-appendix, r=lnicolabors-25/+0
internal: Drop Apache license appendices Closes #14586 Similar to https://github.com/rust-lang/rust/pull/67734
2024-08-27Auto merge of #17973 - Veykril:proc-macro-curr-dir, r=Veykrilbors-14/+34
Expand proc-macros in workspace root, not package root Should fix https://github.com/rust-lang/rust-analyzer/issues/17748. The approach is generally not perfect though as rust-project.json projects don't benefit from this (still, nothing changes in that regard)
2024-08-27Drop Apache license appendicesLaurențiu Nicola-25/+0
2024-08-27Expand proc-macros in workspace root, not package rootLukas Wirth-14/+34
2024-08-27Auto merge of #17970 - ChayimFriedman2:unwrap-unsafe-block, r=Veykrilbors-3/+55
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 #17964.
2024-08-27Revert "feat: Implement `module_path` macro"Lukas Wirth-278/+71
2024-08-26Fix "Unwrap block" assist with block modifiersChayim Refael Friedman-3/+55
The assist just assumes the `{` will be the first character, which led to strange outputs such as `nsafe {`.
2024-08-26Auto merge of #17963 - avrong:avrong/error-lifetimes, r=Veykrilbors-33/+17
Always show error lifetime arguments as `'_` Fixes #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
2024-08-26Show lifetime args if there are only error onesAleksei Trifonov-12/+2
2024-08-26Show and render error lifetime args as `'_`Aleksei Trifonov-21/+15
2024-08-26Auto merge of #17941 - ChayimFriedman2:pre-closure-to-fn, r=Veykrilbors-166/+815
Preliminary work for #17940 I split the PR as requested, and made small commits.
2024-08-26Fix Return Type Syntax to include `..` (i.e. `method(..)` and not ↵Chayim Refael Friedman-16/+183
`method()`) as specified in the RFC
2024-08-25Auto merge of #17960 - duncanawoods:master, r=HKalbasibors-0/+8
fix: add extra_test_bin_args to test explorer test runner `@HKalbasi` I thought I included this in #17470 but it appears not so I have created a new issue #17959 for this fix.
2024-08-25Auto merge of #17961 - Veykril:autoderef-alloc, r=Veykrilbors-23/+56
internal: Don't allocate autoderef steps when not needed
2024-08-25internal: Don't allocate autoderef steps when not neededLukas Wirth-23/+56
2024-08-25fix: add extra_test_bin_args to test explorer test runnerduncan-0/+8
trim whitespace
2024-08-25Auto merge of #17958 - Veykril:deref-chain-method-completions, r=Veykrilbors-33/+90
fix: Fix trait method completions not acknowledging Deref impls
2024-08-25fix: Fix trait method completions not acknowledging Deref implsLukas Wirth-33/+90
2024-08-25Auto merge of #17956 - Veykril:metadata-err, r=Veykrilbors-52/+60
fix: Fix metadata retrying eating original errors
2024-08-25fix: Fix metadata retrying eating original errorsLukas Wirth-52/+60