about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2025-05-15Update Cargo.lockBerrysoft-35/+67
2025-05-15handle trait in functionHayashi Mikihiro-21/+23
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-15check globHayashi Mikihiro-21/+22
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-15rename fn name take_path to anyHayashi Mikihiro-5/+5
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-15fix: ide-assists, generate mut trait impl indentA4-Tacks-3/+91
2025-05-14Don't allow duplicate crates in the all_crates listChayim Refael Friedman-6/+14
For some reason we had them in some projects, I'm not sure why. But this caused cache priming to appear stuck - because it uses a set of crate IDs for the actual work, but for the number of crates to index it just uses `db.all_crates().len()`.
2025-05-14fix: Removing all unused imports removes used imports for imports used for ↵Hayashi Mikihiro-46/+257
Derive macros Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-14fixes: ide-assists, generate_new indent losesA4-Tacks-1/+136
2025-05-12update cfg(bootstrap)Pietro Albini-2/+0
2025-05-10minor: code review tweakgohome001-24/+8
2025-05-09Split duration_constructors to get non-controversial bits out faster.Dietrich Daroch-1/+1
2025-05-09Make diagnostics experimental by defaultFlorian Diebold-33/+47
2025-05-08Merge pull request #19507 from Hmikihiro/fix_module_doc_linksLukas Wirth-149/+548
fix: resolve doc path from parent module if outer comments exist on module
2025-05-08add assert to check ast_index smaller than INNER_ATTR_SET_BITHayashi Mikihiro-13/+9
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-08Fix postfix snippets duplicating derefsChayim Refael Friedman-13/+33
2025-05-08perf: Request cancellation while processing changed filesLukas Wirth-80/+136
2025-05-08Still complete parentheses & method call arguments if there are existing ↵Chayim Refael Friedman-3/+76
parentheses, but they are after a newline
2025-05-08Auto merge of #140106 - dianne:deref-pat-usefulness, r=Nadrierilbors-0/+3
allow deref patterns to participate in exhaustiveness analysis Per [this proposal](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Exhaustiveness), this PR allows deref patterns to participate in exhaustiveness analysis. Currently all deref patterns enforce `DerefPure` bounds on their scrutinees, so this assumes all patterns it's analyzing are well-behaved. This also doesn't support [mixed exhaustiveness](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Mixed-exhaustiveness), and instead emits an error if deref patterns are used together with normal constructors. I think mixed exhaustiveness would be nice to have (especially if we eventually want to support arbitrary `Deref` impls[^1]), but it'd require more work to get reasonable diagnostics[^2]. Tracking issue for deref patterns: #87121 r? `@Nadrieril` [^1]: Regardless of whether we support limited exhaustiveness checking for untrusted `Deref` or always require other arms to be exhaustive, I think it'd be useful to allow mixed matching for user-defined smart pointers. And it'd be strange if it worked there but not for `Cow`. [^2]: I think listing out witnesses of non-exhaustiveness can be confusing when they're not necessarily disjoint, and when you only need to cover some of them, so we'd probably want special formatting and/or explanatory subdiagnostics. And if it's implemented similarly to unions, we'd probably also want some way of merging witnesses; the way witnesses for unions can appear duplicated is pretty unfortunate. I'm not sure yet how the diagnostics should look, especially for deeply nested patterns.
2025-05-07Auto merge of #137995 - hkBst:parse_format_reuse_unescape, r=nnethercotebors-3/+3
Remove duplicate impl of string unescape from parse_format r? `@nnethercote`
2025-05-06add stubbed-out cases for rust-analyzerdianne-0/+3
rust-analyzer doesn't construct `DerefPattern(_)` constructors, so these shouldn't crash. It looks like this is how slice patterns are implemented too.
2025-05-07extract function: `doc_attributes` to find def from inner docHayashi Mikihiro-8/+26
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07add doc link test for hoverHayashi Mikihiro-0/+122
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07add doc link test for goto defHayashi Mikihiro-0/+68
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07check module path inner or outerHayashi Mikihiro-130/+256
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06Remove duplicate impl of string unescapeMarijn Schouten-3/+3
2025-05-06Merge pull request #19738 from ChayimFriedman2/weird-gatsLukas Wirth-0/+32
fix: Don't panic on some weird code
2025-05-06Remove ast index maskHayashi Mikihiro-7/+10
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06import std::iter::repeatHayashi Mikihiro-0/+1
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06Update crates/hir-expand/src/attrs.rsHayashi Mikihiro-1/+1
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-05-06Update crates/hir-expand/src/attrs.rsHayashi Mikihiro-1/+1
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-05-06fix: resolve doc path if outer comments exist on module and replace from ↵Hayashi Mikihiro-34/+99
cfg_attr bit to doc_place bit Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06Don't panic on some weird codeChayim Refael Friedman-0/+32
2025-05-06Merge pull request #19721 from ChayimFriedman2/more-parallelLukas Wirth-256/+188
Better handle parallelism in cache priming
2025-05-06Notify the user that we're collecting symbolsChayim Refael Friedman-1/+10
It could be confusing if they see "Indexing n/n" but cache priming does not finish.
2025-05-06Rollup merge of #140035 - fee1-dead-contrib:push-oszwkkvmpkks, ↵Stuart Cook-1/+18
r=jieyouxu,wesleywiser Implement RFC 3503: frontmatters Tracking issue: #136889 Supercedes #137193. This implements [RFC 3503](https://github.com/rust-lang/rfcs/blob/master/text/3503-frontmatter.md). This might break rust-analyzer. Will look into how to fix that. Suggestions welcome for how to improve diagnostics.
2025-05-05Add a `--num-threads` to the `prime-caches` CLI commandChayim Refael Friedman-60/+61
And make it parallel by default (and remove the `--parallel` flag) to mirror the IDE cache priming.
2025-05-05Better manage parallel prime cachesChayim Refael Friedman-245/+167
To make best use of available cores, and don't waste time waiting for other tasks. See the comments in the code for explanation.
2025-05-05Support environment variable CARGO_MANIFEST_PATH.Victor-0/+17
2025-05-05Implement RFC 3503: frontmattersDeadbeef-1/+18
Supercedes #137193
2025-05-05Merge pull request #19750 from Veykril/push-zvvsopwxovrnLukas Wirth-5/+0
fix: Remove unnecessary token length check for macros in renaming
2025-05-05fix: Remove unnecessary token length check for macros in renamingLukas Wirth-5/+0
2025-05-05Merge pull request #19749 from Veykril/push-tsxvxzzmlxpqLukas Wirth-56/+4
refactor: Remove unnecessary `AsAny` trait
2025-05-05Merge pull request #19748 from Veykril/push-qvmtutwtonouLukas Wirth-10/+4
github: Direct users to discussions instead of issues for questions
2025-05-05refactor: Remove unnecessary `AsAny` traitLukas Wirth-56/+4
2025-05-05github: Direct users to discussions instead of issues for questionsLukas Wirth-10/+4
2025-05-05fix: negative nums in `concat!` expansionVishruth-Thimmaiah-3/+36
2025-05-05Merge pull request #19747 from Veykril/push-kqxvxrxozswrLukas Wirth-18/+111
fix: Fix `move_bounds` assists not working for lifetimes
2025-05-05fix: Fix `move_bounds` assists not working for lifetimesLukas Wirth-47/+196
2025-05-05Merge pull request #19746 from Veykril/push-swvuyqwwplrtLukas Wirth-44/+415
fix: Fix proc-macro API creating malformed negative literals
2025-05-05fix: Fix proc-macro API creating malformed negative literalsLukas Wirth-29/+85