22370 Commits

Author SHA1 Message Date
Lukas Wirth
68e03ee1e5
Merge pull request #19842 from Veykril/push-zunlmrzpnrzk
minor: Support `transmute_unchecked` intrinsic for mir-eval
2025-05-22 06:05:35 +00:00
Lukas Wirth
fce18a5708 Support transmute_unchecked intrinsic for mir-eval 2025-05-22 07:55:06 +02:00
Lukas Wirth
223801fc4d
Merge pull request #19824 from ChayimFriedman2/lints-again
fix: Fix cache problems with lints level
2025-05-22 05:32:13 +00:00
Lukas Wirth
1511c5b7fd
Merge pull request #19839 from ChayimFriedman2/inlay-hints-attr
fix: Correctly set the span of the proc_macro crate's Group delimiters
2025-05-21 18:43:35 +00:00
David Barsky
89d21bc819 internal: fix integrated_benchmarks to make actual edits 2025-05-21 13:35:18 -04:00
Chayim Refael Friedman
bf8d03c1b5 Correctly set the span of the proc_macro crate's Group delimiters
Previously only the open delimiter's span was set, and this caused... weird problems.
2025-05-21 18:31:14 +03:00
Laurențiu Nicola
96a253112c
Merge pull request #19826 from lnicola/sync-from-rust
minor: Sync from downstream
2025-05-20 07:15:48 +00:00
Laurențiu Nicola
ac8c057d87 Bump rustc crates 2025-05-20 10:03:14 +03:00
Laurențiu Nicola
9e86544698 Merge from rust-lang/rust 2025-05-20 10:01:00 +03:00
Chayim Refael Friedman
2d32f025e7 Fix cache problems with lints level
By removing the cache.
2025-05-19 15:36:01 +03:00
Lukas Wirth
59ef84506d
Merge pull request #19822 from Veykril/push-mzzluystvwls
minor: Remote dangling file
2025-05-19 11:20:03 +00:00
Lukas Wirth
04f88362af Remote dangling file 2025-05-19 13:08:29 +02:00
Lukas Wirth
aae7da261e
Merge pull request #19809 from flodiebold/push-txyotwlvvkln
internal: Catch panics in inference in analysis-stats
2025-05-19 10:12:31 +00:00
Lukas Wirth
575d43e1ce Debounce workspace fetching for workspace structure changes 2025-05-19 08:55:38 +02:00
Lukas Wirth
3866336d41
Merge pull request #19757 from Veykril/push-zzxwtzuzqvzx
perf: Request cancellation while processing changed files
2025-05-19 06:20:31 +00:00
Lukas Wirth
e464ff8c75
Merge pull request #19687 from gohome001/highlight_unsafe
feat: highlight unsafe operations
2025-05-18 08:44:10 +00:00
Florian Diebold
dde53614ed Catch panics in inference in analysis-stats 2025-05-17 15:25:20 +02:00
Lukas Wirth
0843d06ad2
Merge pull request #19807 from Veykril/lw-qyynkqysuyuy
fix: Don't overwrite `RUSTUP_TOOLCHAIN` if it is already set
2025-05-16 13:21:15 +00:00
Lukas Wirth
09ecc4cbf6 fix: Don't overwrite RUSTUP_TOOLCHAIN if it is already set 2025-05-16 14:52:28 +02:00
Laurențiu Nicola
7efb73fc4a Inline some format args 2025-05-16 12:03:59 +02:00
Chayim Refael Friedman
5ed11234cc Improve asm support
Including:

 - Infer `label {}` and `const` operands.
 - Correctly handle unsafe check inside `label {}`.
 - Fix an embarrassing parser typo that cause labels to never be part of the AST
2025-05-15 23:36:00 +03:00
Lukas Wirth
dd512b7cf2
Merge pull request #19794 from ChayimFriedman2/dup-crates
fix: Don't allow duplicate crates in the all_crates list
2025-05-15 13:29:17 +00:00
Hayashi Mikihiro
48027bfc19 handle trait in function
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-15 15:12:31 +09:00
Hayashi Mikihiro
55dd2114ed check glob
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-15 14:01:05 +09:00
Hayashi Mikihiro
bf13549ab6 rename fn name take_path to any
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-15 13:18:30 +09:00
Chayim Refael Friedman
56fb415ba7 Don't allow duplicate crates in the all_crates list
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-14 21:38:40 +03:00
Hayashi Mikihiro
30fe761685 fix: Removing all unused imports removes used imports for imports used for Derive macros
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-14 23:51:23 +09:00
Pietro Albini
11328b0e4f
update cfg(bootstrap) 2025-05-12 15:33:37 +02:00
gohome001
c6e3a4cf20 minor: code review tweak 2025-05-10 13:16:34 +08:00
Dietrich Daroch
3faf03f6b4 Split duration_constructors to get non-controversial bits out faster. 2025-05-09 22:52:39 -04:00
Florian Diebold
40b7f4af27 Make diagnostics experimental by default 2025-05-09 16:15:48 +02:00
Lukas Wirth
8b624868e4
Merge pull request #19507 from Hmikihiro/fix_module_doc_links
fix: resolve doc path from parent module if outer comments exist on module
2025-05-08 16:34:35 +00:00
Hayashi Mikihiro
7c7d440188 add assert to check ast_index smaller than INNER_ATTR_SET_BIT
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-08 23:37:47 +09:00
Chayim Refael Friedman
6e8ad1666a Fix postfix snippets duplicating derefs 2025-05-08 11:44:38 +03:00
Lukas Wirth
8d9b318a85 perf: Request cancellation while processing changed files 2025-05-08 10:18:17 +02:00
Chayim Refael Friedman
70842faa4d Still complete parentheses & method call arguments if there are existing parentheses, but they are after a newline 2025-05-08 11:05:39 +03:00
bors
4c2b4ca4f2 Auto merge of #140106 - dianne:deref-pat-usefulness, r=Nadrieril
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-08 02:16:45 +00:00
bors
24390f60d6 Auto merge of #137995 - hkBst:parse_format_reuse_unescape, r=nnethercote
Remove duplicate impl of string unescape from parse_format

r? `@nnethercote`
2025-05-07 06:18:39 +00:00
dianne
eb446f92fd add stubbed-out cases for rust-analyzer
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-06 18:53:55 -07:00
Hayashi Mikihiro
0235ff883f extract function: doc_attributes to find def from inner doc
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 03:12:19 +09:00
Hayashi Mikihiro
cc0e3acd91 add doc link test for hover
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 00:36:52 +09:00
Hayashi Mikihiro
318185720c add doc link test for goto def
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 00:36:42 +09:00
Hayashi Mikihiro
778322eb31 check module path inner or outer
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 00:36:17 +09:00
Marijn Schouten
618c3de146 Remove duplicate impl of string unescape 2025-05-06 10:00:22 +00:00
Lukas Wirth
debaef80be
Merge pull request #19738 from ChayimFriedman2/weird-gats
fix: Don't panic on some weird code
2025-05-06 09:05:19 +00:00
Hayashi Mikihiro
ab4ba5cd29 Remove ast index mask
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06 17:45:09 +09:00
Hayashi Mikihiro
52b523aabe import std::iter::repeat
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06 17:45:09 +09:00
Hayashi Mikihiro
7d6956ea57 Update crates/hir-expand/src/attrs.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-05-06 17:45:09 +09:00
Hayashi Mikihiro
b786f98761 Update crates/hir-expand/src/attrs.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-05-06 17:45:09 +09:00
Hayashi Mikihiro
9f6b4255c2 fix: resolve doc path if outer comments exist on module and replace from cfg_attr bit to doc_place bit
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06 17:45:09 +09:00