about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-07-16Improve syntax fixup a bit, handle incomplete `if`Florian Diebold-34/+120
- allow appending tokens after a token, not just a node - allow inserting delimiters (and remove them again) - fix up `if {}` and `if` without anything following
2022-07-16Auto merge of #12776 - matklad:nosu, r=matkladbors-6/+6
try fixing spurious CI failures on windows It seems like it may be related to self-update? Anyways, I think we should be disabling self-update on CI
2022-07-16try fixing spurious CI failures on windowsAleksey Kladov-6/+6
It seems like it may be related to self-update? Anyways, I think we should be disabling self-update on CI
2022-07-16Auto merge of #12773 - Veykril:self-compl, r=Veykrilbors-18/+124
fix: Improve self param completion applicability Fixes https://github.com/rust-lang/rust-analyzer/issues/9522
2022-07-16fix: Improve self param completion applicabilityLukas Wirth-18/+124
2022-07-16Auto merge of #12772 - Veykril:nameres, r=Veykrilbors-65/+60
internal: Remove allocation in DefCollector::reseed_with_unresolved_attribute
2022-07-16Auto merge of #12766 - Veykril:completion-vis, r=Veykrilbors-63/+121
fix: Don't show qualified path completions for private items Fixes https://github.com/rust-lang/rust-analyzer/issues/12703
2022-07-16internal: Remove allocation in DefCollector::reseed_with_unresolved_attributeLukas Wirth-65/+60
2022-07-16Auto merge of #12764 - matklad:rustupaction, r=lnicolabors-66/+16
Remove deprecate action https://old.reddit.com/r/rust/comments/vyx4oj/actionsrs_organization_became_unmaintained/ Looking at this holistically, I don't fully understand *why* we need an action here? Seems like we can just use rustup? nowadays github runners come with rustup pre-installed.
2022-07-15Remove deprecate actionAleksey Kladov-15/+13
https://old.reddit.com/r/rust/comments/vyx4oj/actionsrs_organization_became_unmaintained/ Looking at this holistically, I don't fully understand *why* we need an action here? Seems like we can just use rustup? nowadays github runners come with rustup pre-installed.
2022-07-15Update .github/workflows/release.yamlAleksey Kladov-1/+1
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2022-07-15Remove deprecate actionAleksey Kladov-55/+7
https://old.reddit.com/r/rust/comments/vyx4oj/actionsrs_organization_became_unmaintained/ Looking at this holistically, I don't fully understand *why* we need an action here? Seems like we can just use rustup? nowadays github runners come with rustup pre-installed.
2022-07-15fix: Don't show qualified path completions for private itemsLukas Wirth-63/+121
2022-07-14Auto merge of #12765 - Veykril:import-insert-fix, r=Veykrilbors-24/+37
fix: Fix imports being inserted before doc comments in inline modules Fixes https://github.com/rust-lang/rust-analyzer/issues/12758
2022-07-14fix: Fix imports being inserted before doc comments in inline modulesLukas Wirth-24/+37
2022-07-14Auto merge of #12556 - DorianListens:dscheidt/generic-extract, r=Veykrilbors-7/+467
fix: Support generics in extract_function assist This change attempts to resolve issue #7636: Extract into Function does not create a generic function with constraints when extracting generic code. In `FunctionBody::analyze_container`, we now traverse the `ancestors` in search of `AnyHasGenericParams`, and attach any `GenericParamList`s and `WhereClause`s we find to the `ContainerInfo`. Later, in `format_function`, we collect all the `GenericParam`s and `WherePred`s from the container, and filter them to keep only types matching `TypeParam`s used within the newly extracted function body or param list. We can then include the new `GenericParamList` and `WhereClause` in the new function definition. This change only impacts `TypeParam`s. `LifetimeParam`s and `ConstParam`s are out of scope for this change. I've never contributed to this project before, but I did try to follow the style guide. I believe that this change represents an improvement over the status quo, but I think it's also fair to argue that it doesn't fully "fix" the linked issue. I'm totally open to merging this as is, or going further to try to make a more complete solution. Also: if there are other unit or integration tests I should add, please let me know where to look!
2022-07-14Auto merge of #12691 - Veykril:proc-macro-diag, r=Veykrilbors-41/+63
fix: Fix unresolved proc macro diagnostics pointing to macro expansions Fixes https://github.com/rust-lang/rust-analyzer/issues/12657
2022-07-14Auto merge of #12735 - feniljain:fix-completions, r=feniljainbors-112/+140
fix(completion): `super::` completion at crate root and module depth aware - should close #12439 - Suggest super according to the depth in tree
2022-07-14fix(completion): `super::` completion at crate root and module depthfeniljain-112/+140
aware
2022-07-13Make search for applicable generics more preciseDorian Scheidt-18/+49
2022-07-13fix: Support generics in extract_function assistDorian Scheidt-7/+436
This change attempts to resolve issue #7636: Extract into Function does not create a generic function with constraints when extracting generic code. In `FunctionBody::analyze_container`, we now traverse the `ancestors` in search of `AnyHasGenericParams`, and attach any `GenericParamList`s and `WhereClause`s we find to the `ContainerInfo`. Later, in `format_function`, we collect all the `GenericParam`s and `WherePred`s from the container, and filter them to keep only types matching `TypeParam`s used within the newly extracted function body or param list. We can then include the new `GenericParamList` and `WhereClause` in the new function definition. This change only impacts `TypeParam`s. `LifetimeParam`s and `ConstParam`s are out of scope for this change.
2022-07-13add testssoruh-0/+177
2022-07-13Auto merge of #12755 - Veykril:server-version, r=lnicolabors-6/+5
fix: Set server binary version when distributing
2022-07-13fix: Set server binary version when distributingLukas Wirth-6/+5
2022-07-13Auto merge of #12754 - Veykril:vscode-status, r=Veykrilbors-15/+16
fix: Fix VSCode status bar tooltip not showing the error messages
2022-07-13fix: Fix VSCode status bar tooltip not showing the error messagesLukas Wirth-15/+16
2022-07-13Auto merge of #12696 - hi-rustin:rustin-patch-fix, r=Veykrilbors-0/+47
Add str_ref_to_string fix close https://github.com/rust-lang/rust-analyzer/issues/11383 When type mismatch is `&str` -> `String` try to fix it.
2022-07-13Auto merge of #12742 - TonalidadeHidrica:fix-obsolete-config-keys, r=Veykrilbors-17/+25
Fix obsolete config keys The config keys were drastically reorganized by #12010, but the docs don't reflect the updates, causing inconsistency and confusion. I checked for such obsolete configuration keys and updated to the new one. For reproducibility, I attach a small shell script that I used to examine the old keys. Now the script only detects `cargoExtraArgs` and `overrideCargo`, which originates from other type definition in the code but not from the configuration. <details><summary>script</summary> ```bash echo "allowMergingIntoGlobImports exprFillDefault importEnforceGranularity importGranularity importMergeBehavior importMergeBehaviour importGroup importPrefix warmup loadOutDirsFromCheck runBuildScripts runBuildScriptsCommand useRustcWrapperForBuildScripts enableExperimental procAttrMacros breakPoints exitPoints yieldPoints linksInHover linksInHover gotoTypeDef chainingHints closureReturnTypeHints hideNamedConstructorHints parameterHints reborrowHints typeHints lruCapacity cargoExtraArgs overrideCargo rustcSource enableRangeFormatting assist\.allowMergingIntoGlobImports assist\.exprFillDefault assist\.importEnforceGranularity assist\.importGranularity assist\.importMergeBehavior assist\.importMergeBehaviour assist\.importGroup assist\.importPrefix primeCaches\.enable cache\.warmup cargo\.loadOutDirsFromCheck cargo\.runBuildScripts cargo\.runBuildScriptsCommand cargo\.useRustcWrapperForBuildScripts completion\.snippets diagnostics\.enableExperimental experimental\.procAttrMacros highlighting\.strings highlightRelated\.breakPoints highlightRelated\.exitPoints highlightRelated\.yieldPoints highlightRelated\.references hover\.documentation hover\.linksInHover hoverActions\.linksInHover hoverActions\.debug hoverActions\.enable hoverActions\.gotoTypeDef hoverActions\.implementations hoverActions\.references hoverActions\.run inlayHints\.chainingHints inlayHints\.closureReturnTypeHints inlayHints\.hideNamedConstructorHints inlayHints\.parameterHints inlayHints\.reborrowHints inlayHints\.typeHints lruCapacity runnables\.cargoExtraArgs runnables\.overrideCargo rustcSource rustfmt\.enableRangeFormatting allFeatures addCallArgumentSnippets addCallParenthesis callInfo\.full cargo\.allFeatures checkOnSave\.allFeatures completion\.addCallArgumentSnippets completion\.addCallParenthesis" | while read -r pattern do rg '\b'$pattern'\b([^.]|$)' . -g "!crates/rust-analyzer/src/config/patch_old_style.rs" -g "!editors/code/src/config.ts" -g "!a.sh" --no-heading --color=always --line-number done exit excluded # debug # enable # run # implementations # references # documentation # references # snippets # strings # full ``` </details>
2022-07-12Auto merge of #12747 - jonas-schievink:proc-macro-abi-1.63, r=jonas-schievinkbors-160/+264
fix: Update 1.63 proc macro ABI to match rustc This updates us to the ABI used by rustc 1.63.0-beta.5, which will likely be the ABI of the next stable Rust release. It should also work on nightly (for now, but future changes won't be supported until the rustc version is bumped). cc https://github.com/rust-lang/rust-analyzer/issues/12600
2022-07-12Update 1.63 proc macro ABI to match rustcJonas Schievink-160/+264
2022-07-11Auto merge of #12745 - jonas-schievink:metavar-exprs, r=jonas-schievinkbors-5/+108
feat: Implement `ignore` and `index` metavar expression Part of https://github.com/rust-lang/rust-analyzer/issues/11952 Fixes https://github.com/rust-lang/rust-analyzer/issues/12675
2022-07-11Implement `ignore` and `index` metavar expressionJonas Schievink-5/+108
2022-07-11Auto merge of #12744 - hi-rustin:rustin-patch-typos, r=lnicolabors-2/+2
Fix typos Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-11Fix typoshi-rustin-2/+2
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-11Fix obsolete `completion.snippets` configTonalidadeHidrica-2/+2
2022-07-11Fix obsolete `enableRangeFormatting` configTonalidadeHidrica-1/+1
2022-07-11Fix `rustcSource` -> `rustc_source`TonalidadeHidrica-2/+2
This only fixes the comments in the internal source, which is not mandatory at all
2022-07-11Fix obsolete `diagnostics.experimental.enable`TonalidadeHidrica-1/+1
2022-07-11Fix obsolete `loadOutDirsFromCheck` configsTonalidadeHidrica-3/+9
2022-07-11Fix config keys regarding imports in docsTonalidadeHidrica-8/+10
2022-07-10fix: ignore renames for crate rootharpsword-0/+33
2022-07-09Auto merge of #12732 - lnicola:bump-npm, r=lnicolabors-1182/+791
Bump npm deps
2022-07-09Bump transitive npm depsLaurențiu Nicola-741/+347
2022-07-09Bump @vscode/test-electronLaurențiu Nicola-8/+8
2022-07-09Bump @types/node to 16Laurențiu Nicola-8/+8
2022-07-09Bump typescript and tslibLaurențiu Nicola-16/+16
2022-07-09Bump prettierLaurențiu Nicola-8/+8
2022-07-09Bump @typescript-eslintLaurențiu Nicola-106/+106
2022-07-09Bump vsceLaurențiu Nicola-8/+8
2022-07-09Bump eslintLaurențiu Nicola-50/+50