about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2024-06-03SimplifyLukas Wirth-33/+31
2024-06-03DeduplicateLukas Wirth-30/+20
2024-06-03Fix find_path search not reducing scope appropriately for foreign itemsLukas Wirth-12/+18
2024-06-03SimplifyLukas Wirth-149/+113
2024-06-03Auto merge of #17329 - Nilstrieb:rustc_deprecated_safe_2024, r=Veykrilbors-0/+23
Don't mark `#[rustc_deprecated_safe_2024]` functions as unsafe `std::env::set_var` will be unsafe in edition 2024, but not before it. I couldn't quite figure out how to check for the span properly, so for now we just turn the false positives into false negatives, which are less bad.
2024-06-03Auto merge of #17315 - hamirmahal:style/simplify-string-interpolation, r=Veykrilbors-79/+71
style: simplify string interpolation
2024-06-03Auto merge of #17312 - regexident:function-fn-ptr-type, r=Veykrilbors-0/+8
Add `Function::fn_ptr_type(…)` for obtaining name-erased function type The use case of this function if being able to group functions by their function ptr type. cc `@flodiebold`
2024-06-03Auto merge of #17333 - DropDemBits:extract-format-args-snippet-cap, r=Veykrilbors-68/+189
fix: Only generate snippets for `extract_expressions_from_format_string` if snippets are supported Part of #17332 Fixes `extract_expressions_from_format_string` so that it doesn't generate snippets if the client doesn't support it.
2024-06-02Add path info to `AbsPathBuf::assert`'s assertLukas Wirth-1/+1
2024-06-02fix typos & formattingDropDemBits-3/+7
2024-06-02Make `extract_expressions_from_format_string` only use snippets when availableDropDemBits-55/+98
2024-06-02Add `ast::Expr::parse`DropDemBits-0/+32
2024-06-02minor: tidy up `Parse` a little bitDropDemBits-11/+10
- Add doc comments to some `Parse` methods - Uses `Parse::new` more
2024-06-02Add `tt_from_syntax`DropDemBits-2/+45
Used for inserting syntax nodes into existing token trees
2024-06-02Don't mark `#[rustc_deprecated_safe_2024]` functions as unsafeNilstrieb-0/+23
`std::env::set_var` will be unsafe in edition 2024, but not before it. I couldn't quite figure out how to check for the span properly, so for now we just turn the false positives into false negatives, which are less bad.
2024-06-02Auto merge of #17328 - Veykril:derive-helper-completions, r=Veykrilbors-98/+209
feat: Enable completions within derive helper attributes ![Code_zG5qInoQ6B](https://github.com/rust-lang/rust-analyzer/assets/3757771/db30b98d-4981-45e3-83a5-7ff23fbd3f66)
2024-06-02feat: Enable completions within derive helper attributesLukas Wirth-98/+209
2024-06-01Auto merge of #17326 - Veykril:fix-attr-derive-container, r=Veykrilbors-40/+48
fix: Fix container search failing for tokens originating within derive attributes
2024-06-01fix: Fix container search failing for tokens originating within derive ↵Lukas Wirth-40/+48
attributes
2024-06-01Auto merge of #17302 - mladedav:dm/fix-clear, r=Veykrilbors-13/+30
fix diagnostics clearing when flychecks run per-workspace This might be causing #17300 or it's a different bug with the same functionality. I wonder if the decision to clear diagnostics should stay in the main loop or maybe the flycheck itself should track it and tell the mainloop? I have used a hash map but we could just as well use a vector since the IDs are `usizes` in some given range starting at 0. It would be probably faster but this just felt a bit cleaner and it allows us to change the ID to newtype later and we can just use a hasher that returns the underlying integer.
2024-06-01Move state trackig of diagnostic clearing inside `FlycheckActor`David Mládek-41/+31
2024-06-01Auto merge of #17278 - chenx97:flycheck-process-wrap, r=lnicolabors-45/+73
internal: replace command-group with process-wrap Because command-group no longer receives updates and depends on an older version of nix.
2024-05-31docs: Missing word typoLuke Franceschini-1/+1
2024-05-31minor: replace command-group with process-wrapHenry Chen-45/+73
Because command-group no longer receives updates and depends on an older version of nix.
2024-05-30fix: formatting in `handlers/unresolved_method.rs`Hamir Mahal-2/+1
2024-05-30style: simplify string interpolationHamir Mahal-78/+71
2024-05-29Add `Function::fn_ptr_type(…)` for obtaining name-erased function typeVincent Esche-0/+8
2024-05-28Add preference modifier for workspace-local crates when using auto import.Mathew Horner-1/+46
2024-05-28add `FlycheckStatus` to global stateDavid Mládek-7/+34
2024-05-28fix diagnostics clearing when flychecks run per-workspaceDavid Mládek-6/+6
2024-05-27Auto merge of #17258 - maxwase:code-assist-async-sugar, r=Veykrilbors-0/+644
Add `toggle_async_sugar` assist code action Implement code action for sugaring and de-sugaring asynchronous functions. This code action does not import `Future` trait when de-sugaring and does not touch function boby, I guess this can be implemented later if needed. This action also does not take into consideration other bounds because IMO it's usually "let me try to use sugared version here". Feel free to request changes, that's my first code action implementation 😄 Closes #17010 Relates to #16195
2024-05-27Auto merge of #17253 - ThouCheese:master, r=Veykrilbors-0/+702
Implement assist to switch between doc and normal comments Hey first PR to rust-analyzer to get my feet wet with the code base. It's an assist to switch a normal comment to a doc comment and back, something I've found myself doing by hand a couple of times. I shamelessly stole `relevant_line_comments` from `convert_comment_block`, because I didn't see any inter-assist imports happening in the files I peeked at so I thought this would be preferable.
2024-05-27Auto merge of #17291 - kilpkonn:master, r=Veykrilbors-5/+19
Fix `data_constructor` ignoring generics for struct Previously didn't work for structs with generics due to `field.ty()` having placeholders in type. _Enums were handeled correctly already._ Also renamed `type_constructor -> data_constructor` as this is more correct name for it
2024-05-26Auto merge of #17296 - mathew-horner:no-clone-target, r=Veykrilbors-3/+3
Avoid clone when constructing runnable label. I stumbled across this when reading this code. This seems like an unnecessary allocation (though likely small?)
2024-05-25Removed returnJonas Rinke-3/+4
2024-05-25Avoid clone when constructing runnable label.Mathew Horner-3/+3
2024-05-25FormattingJonas Rinke-2/+2
2024-05-25SemicolonJonas Rinke-1/+1
2024-05-25Use correct format for setting environment variables when debugging with ↵Jonas Rinke-1/+3
cpptools
2024-05-25Fix `data_constructor` ignoring generics for structTavo Annus-5/+19
2024-05-24remove nested match with and_thenLuuk Wester-4/+1
2024-05-24add test for every keyword, fix bugLuuk Wester-16/+94
2024-05-24cosmetic and performance fixes, and drop support for adding //! comments ↵Luuk Wester-113/+78
anywhere, except for at the top of files.
2024-05-24Review fixes: Assist scope, trait qualifymaxwase-45/+126
2024-05-24Review fixes: Split into 2, check tuple fieldsmaxwase-57/+137
2024-05-24Add toggle_async_sugar assist code actionmaxwase-0/+483
2024-05-24tests: update test for runnablesroife-0/+93
2024-05-24Update docsroife-1/+2
2024-05-24Use cwd from runnable.args for debuggerroife-3/+4
2024-05-24Revert "Debug use cargo workspace root as cwd. fixes #13022"roife-32/+12
This reverts commit 4ca86edac97d47eecb78b16abf255950c10b67ca.