about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates
AgeCommit message (Collapse)AuthorLines
2024-10-22Fix new nightly lintsLukas Wirth-49/+79
2024-10-22tests: Add `lsif_contains_generated_constant` testJohann Hemmann-15/+198
2024-10-22Cleanup file structure proto handlingLukas Wirth-10/+3
2024-10-22Auto merge of #18362 - duncpro:goto-def-ranges, r=Veykrilbors-17/+139
feat: goto definition on range operators Closes #18342
2024-10-22tidyDuncan Proctor-15/+27
2024-10-22Replace some LayoutError variants with the rustc_abi errorsLaurențiu Nicola-11/+9
2024-10-22Merge from rust-lang/rustLaurențiu Nicola-5/+4
2024-10-22goto definition on RangeFrom, RangeFull, RangeTo, and RangeToInclusive links ↵Duncan Proctor-36/+65
to respective struct
2024-10-21Move explicit range handling out of goto_definition, use OperatorClass insteadduncanproctor-53/+70
2024-10-21Auto merge of #18360 - roife:safe-kw-3, r=Veykrilbors-54/+146
feat: better completions for extern blcoks This PR refactors `add_keywords` (making it much clearer!) and enhances completion for `extern` blocks. It is recommended to reviewing the changes in order of the commits: - The first commit (f3c4dde0a4917a2bac98605cc045eecfb4d69872) doesn’t change any logic but refactors parts of the `add_keywords` function and adds detailed comments. - The second commit (5dcc1ab649bf8a49cadf006d620871b12f093a2f) improves completion for `extern` kw and extern blocks.
2024-10-22minor: refactor completions in item_listroife-27/+24
2024-10-21GotoDefinition on a Range or InclusiveRange operator will link to the struct ↵duncanproctor-4/+68
definition
2024-10-21Auto merge of #18361 - Veykril:veykril/push-uzsokssoyznx, r=Veykrilbors-41/+125
fix: Fix token downmapping failing for include! inputs Supercedes https://github.com/rust-lang/rust-analyzer/pull/18325 Fixes https://github.com/rust-lang/rust-analyzer/pull/18325 Fixes https://github.com/rust-lang/rust-analyzer/issues/18313 Fixes https://github.com/rust-lang/rust-analyzer/issues/18314
2024-10-21fix: Fix token downmapping failing for include! inputsLukas Wirth-41/+125
2024-10-21feat: better completions for extern blcoksroife-18/+104
2024-10-21refactor add_keywords in ide-completions for clarityroife-47/+56
2024-10-21Auto merge of #18294 - Giga-Bowser:master, r=Veykrilbors-2387/+4718
Add wrap/unwrap return type in Option I pretty much just copied over the code and tests for wrapping/unwrapping return types in `Result` and then did a bunch of find and replace changes. I handled unwrapping statements returning `None` by just replacing `None` with the unit type, but I'm open to suggestions for more intuitive behavior here.
2024-10-21Auto merge of #18337 - dqkqd:issue-18287, r=Veykrilbors-4/+20
fix: private items are shown in completions for modules in fn body Close: #18287
2024-10-21fix: private items are shown in completions for modules in fn bodyKhanh Duong Quoc-4/+20
2024-10-21fix: FIx mbe bench tests being iteration order dependentLukas Wirth-5/+8
2024-10-21Update ide testsLukas Wirth-134/+135
2024-10-21Fix recursive_adt fixtureLukas Wirth-6/+8
2024-10-21Update rustc-hash to version 2Noratrieb-6/+3
This brings in the new optimized algorithm that was shown to have small performance benefits for rustc.
2024-10-21fix: classify `safe` as a contextual kwroife-10/+10
2024-10-20Store patterns desugared from destructuring assignments in source mapChayim Refael Friedman-174/+280
And few more fixups. I was worried this will lead to more memory usage since `ExprOrPatId` is double the size of `ExprId`, but this does not regress `analysis-stats .`. If this turns out to be a problem, we can easily use the high bit to encode this information.
2024-10-20Handle destructuring assignments uniformlyChayim Refael Friedman-707/+886
Instead of lowering them to `<expr> = <expr>`, then hacking on-demand to resolve them, we lower them to `<pat> = <expr>`, and use the pattern infrastructure to handle them. It turns out, destructuring assignments are surprisingly similar to pattern bindings, and so only minor modifications are needed. This fixes few bugs that arose because of the non-uniform handling (for example, MIR lowering not handling slice and record patterns, and closure capture calculation not handling destructuring assignments at all), and furthermore, guarantees we won't have such bugs in the future, since the programmer will always have to explicitly handle `Expr::Assignment`. Tests don't pass yet; that's because the generated patterns do not exist in the source map. The next commit will fix that.
2024-10-20Remove now-incorrect codeChayim Refael Friedman-8/+0
Because our lint infra *can* handle allows from within macro expansions! (Also, what did this reason have to do with something that is a hard error and not a lint? I'm puzzled). I wonder how many such diagnostics we have... Maybe that also mean we can change `unused_mut` to no-longer-experimental? But this is a change I'm afraid to do without checking.
2024-10-20fix: do not emit unsafe diagnositcs for safe statics in extern blocksroife-3/+62
2024-10-20feat: initial support for safe_kw in extern blocksroife-9/+264
2024-10-20Rollup merge of #131942 - workingjubilee:reduce-haruspicy, r=lukas-code,lnicolaStuart Cook-5/+4
compiler: Adopt rust-analyzer impls for `LayoutCalculatorError` We're about to massively churn the internals of `rustc_abi`. To minimize the immediate and future impact on rust-analyzer, as a subtree that depends on this crate, grow some API on `LayoutCalculatorError` that reflects their uses of it. This way we can nest the type in theirs, and they can just call functions on it without having to inspect and flatten-out its innards.
2024-10-19rust-analyzer: Nest `LayoutCalculatorError` in `hir_ty::LayoutError`Jubilee Young-5/+4
2024-10-19Combine entry points for wrapping/unwrapping return typesGiga Bowser-426/+592
2024-10-18Increase TOKEN_LIMIT for hir-expandWei Xu-1/+1
2024-10-18Clamp Position::character to line lengthJohannes Altmanninger-2/+10
LSP says about Position::character > If the character value is greater than the line length it defaults back to the line length. but from_proto::offset() doesn't implement this. A client might for example request code actions for a whole line by sending Position::character=99999. I don't think there is ever a reason (besides laziness) why the client can't specify the line length instead but I guess we should not crash but follow protocol. Technically it should be a warning, not an error but warning is not shown by default so keep it at error I guess. Fixes #18240
2024-10-18Auto merge of #18331 - Veykril:veykril/push-tsolukqqyllz, r=Veykrilbors-1/+11
internal: Add more trivially `Sized` types to `is_sized` check
2024-10-18internal: Add more trivially `Sized` types to `is_sized` checkLukas Wirth-1/+11
2024-10-18fix: Fix CI running analysis-stats incorrectly against the standard librariesLukas Wirth-5/+10
2024-10-17Re-use code for wrapping/unwrapping return typesGiga Bowser-3488/+3305
2024-10-17Bump rustc cratesLaurențiu Nicola-2/+3
2024-10-17Merge from rust-lang/rustLaurențiu Nicola-0/+6
2024-10-17Bump version of scip crateVarun Gandhi-1/+1
2024-10-16internal: Use local time when formatting logsWilfred Hughes-1/+5
When debugging rust-analyzer and looking at logs, it's much easier to read when the timestamp is in the local timezone. Before: 2024-08-28T20:55:38.792321Z INFO ParseQuery: invoked at R18460 After: 2024-08-28T13:55:38.792321-07:00 INFO ParseQuery: invoked at R18460
2024-10-15Auto merge of #18278 - ShoyuVanilla:never-place, r=Veykrilbors-102/+637
Do not consider match/let/ref of place that evaluates to ! to diverge, disallow coercions from them too Resolves #18237
2024-10-15fix: autofix for missing wrapped unit in return exprroife-0/+38
2024-10-15Do not consider match/let/ref of place that evaluates to ! to diverge, ↵Shoyu Vanilla-102/+637
disallow coercions from them too
2024-10-14Auto merge of #18292 - roife:fix-issue-17427, r=Veykrilbors-12/+41
feat: handle self-param outside of methods when renaming close #17427
2024-10-14feat: handle self-param outside of methods when renamingroife-12/+41
2024-10-14Auto merge of #18239 - davidbarsky:davidbarsky/push-lswkwuyrpuqv, r=davidbarskybors-535/+537
chore: rename `salsa` to `ra_salsa` Laying some groundwork to start before I import the new Salsa crate. Here's why: 1. As part of the migration, `@darichey,` `@Wilfred,` and I will create new Salsa equivalents of the existing databases/query groups. We'll get them to compile crate-by-crate. 2. Once we wrote all equivalents of all queries, we'd start to refactor usage sites of the vendored Salsa to use the new Salsa databases. 3. Starting porting usage sites of old Salsa to the new Salsa. 4. Remove the vendored `ra_salsa`; declare victory.
2024-10-14chore: rename salsa to ra_salsaDavid Barsky-535/+537
2024-10-14internal: switch remaining OpQueues to use named structsDavid Barsky-10/+23