about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-07-27feat: add trace level to client logsJosh McKinney-0/+4
2024-07-27feat: use vscode log format for client logsJosh McKinney-46/+44
This change updates the log format to use the vscode log format instead of the custom log format, by replacing the `OutputChannel` with a `LogOutputChannel` and using the `debug`, `info`, `warn`, and `error` methods on it. This has the following benefits: - Each log level now has its own color and the timestamp is in a more standard format - Inspect output (e.g. the log of the config object) is now colored - Error stack traces are now shown in the output - The log level is now controlled on the output tab by clicking the gear icon and selecting "Debug" or by passing the `--log` parameter to vscode. The `trace.extension` setting has been marked as deprecated.
2024-07-27Auto merge of #17511 - mckenfra:github_issue_17497_fix_v5, r=flodieboldbors-3/+47
#17497 - Invalid RA diagnostic error: expected 2 arguments, found 1 Fix for #17497 The issue occurs because in some configurations of traits where one of them has `Deref` as a supertrait, RA's type inference algorithm fails to resolve the `Deref::Target` type, and instead uses a `TyKind::BoundVar` (i.e. an unknown type). This "autoderefed" type then incorrectly acts as if it implements all traits in scope. The fix is to re-apply the same sanity-check that is done in [`iterate_method_candidates_with_autoref()`](https://github.com/rust-lang/rust-analyzer/blob/9463d9eea4b87e651e7d8ed8425a9c92f23b1cdf/crates/hir-ty/src/method_resolution.rs#L1008), that is: don't try to resolve methods on unknown types. This same sanity-check is now done on each autoderefed type for which trait methods are about to be checked. If the autoderefed type is unknown, then the iterating of the trait methods for that type is skipped. Includes a unit test that only passes after applying the fixes in this commit. Includes a change to the assertion count in test `syntax_highlighting::tests::benchmark_syntax_highlighting_parser` as suggested by Lukas Wirth during review. Includes a change to the sanity-check code as suggested by Florian Diebold during review.
2024-07-28Fix for #17497 - Invalid RA diagnostic error: expected 2 arguments, found 1Francis McKenzie-3/+47
The issue occurs because in some configurations of traits where one of them has Deref as a supertrait, RA's type inference algorithm fails to resolve the Deref::Target type, and instead uses a TyKind::BoundVar (i.e. an unknown type). This "autoderefed" type then incorrectly acts as if it implements all traits in scope. The fix is to re-apply the same sanity-check that is done in iterate_method_candidates_with_autoref(), that is: don't try to resolve methods on unknown types. This same sanity-check is now done on each autoderefed type for which trait methods are about to be checked. If the autoderefed type is unknown, then the iterating of the trait methods for that type is skipped. Includes a unit test that only passes after applying the fixes in this commit. Includes a change to the assertion count in test syntax_highlighting::tests::benchmark_syntax_highlighting_parser as suggested by Lukas Wirth during review. Includes a change to the sanity-check code as suggested by Florian Diebold during review.
2024-07-27Auto merge of #17714 - Throne3d:patch-1, r=Veykrilbors-1/+1
docs: Reference cov_mark crate instead of test_utils/mark Seems this was switched over in https://github.com/rust-lang/rust-analyzer/issues/7922 I'm guessing this should skip the changelog because it's so minor, right? Reading through https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/style.md and trying to get up to speed here =)
2024-07-27Auto merge of #17713 - alibektas:17710, r=Veykrilbors-3/+45
fix: early exit if unresolved field is an index Fixes #17710
2024-07-26docs: Reference cov_mark crate instead of test_utils/markEdward Jones-1/+1
Seems this was switched over in https://github.com/rust-lang/rust-analyzer/issues/7922
2024-07-26early exit if unresolved field is an indexAli Bektas-3/+45
2024-07-26Auto merge of #17709 - Young-Flash:hover_tooltip, r=Veykrilbors-6/+11
fix: tweak hover/tooltip links close https://github.com/rust-lang/rust-analyzer/issues/17628
2024-07-26fix: tweak hover/tooltip linksYoung-Flash-6/+11
2024-07-26Auto merge of #17706 - Veykril:fragment-include-fix, r=Veykrilbors-3/+18
fix: Fix includes not working with expr fragment inputs Temporary workaround for https://github.com/rust-lang/rust-analyzer/issues/17701
2024-07-26fix: Fix includes not working with expr fragment inputsLukas Wirth-3/+18
2024-07-25Auto merge of #17698 - Veykril:remove-trace, r=Veykrilbors-127/+46
internal: Remove unused trace module
2024-07-25Remove unused trace moduleLukas Wirth-127/+46
2024-07-25Auto merge of #17676 - winstxnhdw:precise-capturing, r=Veykrilbors-89/+237
feat: add preliminary support for `+ use<..>` `precise_capturing` syntax ## Summary This PR adds basic support for the following syntax. ```rs fn captures<'a: 'a, 'b: 'b, T>() -> impl Sized + use<'b, T> {} // ~~~~~~~~~~~~~~~~~~~~~~~ // This opaque type does not capture `'a`. fn outlives<'o, T: 'o>(_: T) {} fn caller<'o, 'a, 'b: 'o, T: 'o>() { // ~~ // ^ Note that we don't need `'a: 'o`. outlives::<'o>(captures::<'a, 'b, T>()); } ``` Related to #17598
2024-07-25fix: handle new `TypeBoundKind` variantWinston H.-0/+1
2024-07-25Auto merge of #17697 - Veykril:cargo-env, r=Veykrilbors-2/+14
fix: Support new cargo config get env format Fixes https://github.com/rust-lang/rust-analyzer/issues/17686
2024-07-25fix: Support new cargo config get env formatLukas Wirth-2/+14
2024-07-25Auto merge of #17695 - Veykril:typeref-size, r=Veykrilbors-17/+18
internal: Reduce size of TypeRef by 8 bytes
2024-07-25Make legacy_const_generics_indices thin by double boxing as its seldom usedLukas Wirth-8/+9
2024-07-25Reduce size of TypeRef by 8 bytesLukas Wirth-9/+9
2024-07-25Auto merge of #17693 - Veykril:astidmap, r=Veykrilbors-466/+1147
Remove Params and Fields from AstIdMap These are too volatile, and the only reason for them seems to be for cfg diagnostics which does not carry the weight
2024-07-25Fix incorrect handling of cfg'd varargsLukas Wirth-16/+37
2024-07-25Remove Params and Fields from AstIdMapLukas Wirth-449/+494
2024-07-25Generate From impls for Any* nodesLukas Wirth-19/+634
2024-07-25fix: temporarily use `ast::GenericParamList`winstxnhdw-0/+4
2024-07-25Auto merge of #17690 - lnicola:unsafe_op_in_unsafe_fn, r=lnicolabors-30/+29
internal: Fix and enable unsafe_op_in_unsafe_fn Closes #17689
2024-07-25Fix and enable unsafe_op_in_unsafe_fnLaurențiu Nicola-30/+29
2024-07-24Auto merge of #17674 - ↵bors-0/+7
davidbarsky:david/add-more-information-to-status-command, r=Veykril internal: add more output to the status command Bit of a lazy change, but this is was pretty handy. I think I should clean up the configuration into something a bit more legible (maybe serialize as JSON?), but I think this is a good enough starting point that we might as well start asking people for it in issue reports.
2024-07-24Auto merge of #17610 - regexident:impl-all_in_module, r=Veykrilbors-0/+4
Add method `Impl::all_in_module(…)` for allowing more localized querying This PR is motivated by an [outside use](https://github.com/regexident/cargo-modules) of the `ra_ap_hir` crate that would benefit from being able to more efficiently query for all impls of a given module (instead of having to query for its parent crate's impls and then filtering on `impl_hir.module(db) == module_hir`). I have the suspicion that the code as is won't quite work for file-level modules, since those don't have a block, afaict, but with all the crate-rename and version shenanigans around the `ra_ap_` release process I haven't yet been able to figure out how to patch a `ra_ap_` dependency from a third-party crate (let alone how to test this from inside of `rust-analyzer`), so haven't been able to actually run and test this. 😔 Any hints on how to make this (i.e. the code itself, as well as the testing) work are more than welcome!
2024-07-24Auto merge of #17661 - alibektas:read_ratoml_on_startup, r=Veykrilbors-8/+42
minor: Read workspace root ratomls on startup
2024-07-24fix: `use` cannot have optional genericsWinston H.-1/+1
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2024-07-23fix: move `use` parsing to outer match armwinstxnhdw-18/+19
2024-07-23chore: update codegenswinstxnhdw-89/+220
2024-07-23feat: add arm for `use` type boundwinstxnhdw-0/+6
2024-07-23feat: add `use` type bound grammarwinstxnhdw-0/+5
2024-07-23Auto merge of #17395 - ↵bors-366/+14
davidbarsky:david/remove-unindexed-project-notification, r=Veykril chore: remove `UnindexinedProject` notification This PR is split out from https://github.com/rust-lang/rust-analyzer/pull/17246/ (and contains its changes, which is a little annoying from a review perspective...). I'd like to land this change a week or so after #17246 lands in order to give any users of the unindexed project notification time to adopt migrate.
2024-07-23internal: remove UnindexedProject notificationDavid Barsky-366/+14
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
2024-07-23Auto merge of #17483 - alibektas:ratoml/fixes, r=alibektasbors-115/+92
minor : fixes for ratoml module This is a follow-up PR to #17058. - Parse errors are reflected as such by defining a new variant called `ConfigError::ParseError` - New error collection has been added to store config level agnostic errors. EDIT : Some things that this PR promised to solve are removed and will be addressed by other PRs
2024-07-23rename config::ConfigChange::other_errors to validation_errorsAli Bektas-6/+5
2024-07-23minor changesAli Bektas-6/+8
2024-07-23Add method `Impl::all_in_module(…)` for supporting more localized queryingVincent Esche-0/+4
2024-07-23Auto merge of #17675 - PaulDotSH:remove-lens-force-custom-commands-config, ↵bors-23/+2
r=lnicola Remove lens.forceCustomCommands config Closes https://github.com/rust-lang/rust-analyzer/issues/17643 A very simple PR that removes the lens.forceCustomCommands config feature without side effects.
2024-07-23Remove lens.forceCustomCommands configPaulDotSH-23/+2
2024-07-22internal: add more output to the status commandDavid Barsky-0/+7
2024-07-22Auto merge of #17671 - Veykril:binding-size, r=Veykrilbors-56/+94
internal: Shrink size of `Binding` This should save a bit of memory now that we LRU the source map
2024-07-22internal: Shrink size of `Binding`Lukas Wirth-56/+94
2024-07-22Auto merge of #17670 - Veykril:mem, r=Veykrilbors-26/+19
LRU `body_with_source_map` query This query is being invalidated all the time anyways (we have an extra query on top of it for the body incrementality that is not source dependent), so there is little reason to keep these around all the time when only some IDE features are interested in them.
2024-07-22LRU `body_with_source_map` queryLukas Wirth-26/+19
2024-07-22Auto merge of #17668 - Veykril:incorrect-nevers, r=Veykrilbors-3/+2
Remove incorrect never! invocations These can crop up when the `Future` related lang items are missing