34780 Commits

Author SHA1 Message Date
Lukas Wirth
93182f4670
Merge pull request #19877 from tgross35/remove-concat-idents
chore: Remove support for `concat_idents!`
2025-05-28 04:17:42 +00:00
Trevor Gross
e6e5e3cc41 chore: Remove support for concat_idents!
`concat_idents!` was deprecated in [1] and will be removed in the near
future. rust-analyzer's support is independent of rustc's, so drop RA
support now to make syncing easier.

[1]: https://github.com/rust-lang/rust/pull/137653
2025-05-28 03:59:32 +00:00
Chayim Refael Friedman
4f7af13637
Merge pull request #19875 from ShoyuVanilla/issue-19844
fix: Skip pattern analysis on type mismatches
2025-05-27 23:38:38 +00:00
Shoyu Vanilla
8682c1b9b4 fix: Skip pattern analysis on type mismatches 2025-05-28 08:11:14 +09:00
Chayim Refael Friedman
7230ded9c7
Merge pull request #19850 from regexident/dyn-semantics
Add support for type-erased `Semantics<'db, dyn HirDatabase>`, by use of `DB: ?Sized`
2025-05-27 13:50:27 +00:00
Vincent Esche
a01fe887c6 Make Semantics<'db, DB> support Semantics<'db, dyn HirDatabase>, by use of DB: ?Sized 2025-05-27 10:43:28 +02:00
Chayim Refael Friedman
2a7f18bbda Fix inference of AsyncFnX return type 2025-05-27 06:44:50 +03:00
Chayim Refael Friedman
7fa66d67a7
Merge pull request #19862 from ChayimFriedman2/item-resolve-macro-hir
fix: Fix IDE resolution of item macros
2025-05-26 21:34:18 +00:00
vremyavnikuda
a2b58e216d fix: formated to clippy 2025-05-26 16:41:49 +07:00
vremyavnikuda
8dd930390b fix: the lines are formatted according to clippy 2025-05-26 16:00:45 +07:00
vremyavnikuda
0902094d01 fix: the lines are formatted according to clippy 2025-05-26 15:51:50 +07:00
vremyavnikuda
82edbbcd2a docs: add documentation for find_all_refs constructor search (#10725) 2025-05-26 15:51:50 +07:00
Lukas Wirth
f98b6220c4
Merge pull request #19792 from A4-Tacks/fix-generate-mut-trait-impl-indent
fix: ide-assists, generate mut trait impl indent
2025-05-26 08:29:22 +00:00
Lukas Wirth
acab393c4a
Merge pull request #19819 from Veykril/push-utvzwvwuuvlm
Change import prefix default to be by crate
2025-05-26 08:28:16 +00:00
Lukas Wirth
e0451c4b8a
Merge pull request #19785 from A4-Tacks/fix-generate-new-indent
fixes: ide-assists, generate_new indent loses
2025-05-26 07:24:41 +00:00
Lukas Wirth
d146d3bc90
Merge pull request #19851 from ChayimFriedman2/normalize-exhaustiveness
fix: Normalize when checking for uninhabited types for pattern exhaustiveness checking
2025-05-26 07:19:12 +00:00
Lukas Wirth
de4b7b642b
Merge pull request #19864 from ChayimFriedman2/is-in-macro
fix: Properly implement `might_be_inside_macro_call()` using semantic information instead of syntactical hacks
2025-05-26 05:21:01 +00:00
bors
73c6f1d0c7 Auto merge of #138489 - tmiasko:call-tmps-lifetime, r=workingjubilee
Describe lifetime of call argument temporaries passed indirectly

Fixes #132014.
2025-05-26 01:16:52 +00:00
Chayim Refael Friedman
87529e8631 Properly implement might_be_inside_macro_call() using semantic information instead of syntactical hacks
And rename it to `is_inside_macro_call()` accordingly.
2025-05-25 20:15:58 +03:00
Chayim Refael Friedman
3e0ab7219a Fix IDE resolution of item macros
It wasn't inside the source, because there was no source map.
2025-05-25 17:20:20 +03:00
bors
86349e79a1 Auto merge of #141086 - a1phyr:spec_advance_by, r=jhpratt
Implement `advance_by` via `try_fold` for `Sized` iterators

When `try_fold` is overriden, it is usually easier for compilers to optimize.

Example difference: https://iter.godbolt.org/z/z8cEfnKro
2025-05-25 11:34:43 +00:00
bors
dcbbc5e4c5 Auto merge of #141372 - khuey:ir_call_dbg_loc, r=jieyouxu
Use the fn_span when emitting function calls for better debug info.

This especially improves the developer experience for long chains of function calls that span multiple lines, which is common with builder patterns, chains of iterator/future combinators, etc.

try-job: armhf-gnu
try-job: test-various
try-job: x86_64-msvc-1
try-job: arm-android

r? `@jieyouxu`
2025-05-24 17:48:21 +00:00
bors
93c200ae97 Auto merge of #141062 - ChaiTRex:ide_fmt_2024, r=Mark-Simulacrum
Update IDEs to use rustfmt 2024, fix Zed settings

Update IDEs to use rustfmt 2024, fix Zed settings

- Update IDE `rust-analyzer` settings to use 2024 rather than 2021.
- Fix Zed settings by removing `${workspaceFolder}/` from paths.
2025-05-23 11:15:24 +00:00
Lukas Wirth
d2f17873ff
Merge pull request #19853 from Veykril/push-ovpvzkxmpsuk
Bump salsa
2025-05-26
2025-05-23 11:08:19 +00:00
Lukas Wirth
cbff4ae151 Bump salsa 2025-05-23 12:58:00 +02:00
Chayim Refael Friedman
f17bbfc48b Normalize when checking for uninhabited types for pattern exhaustiveness checking 2025-05-23 01:01:21 +03:00
bors
55bcf3ab63 Auto merge of #141135 - compiler-errors:fast-path-2, r=lcnr
Fast path for processing some obligations in the new solver

Fast path applies to:
- Dyn compatibility predicates
- Region and type outlives predicates
- Trivially sized predicates
2025-05-22 11:39:10 +00:00
bors
9db5a01db4 Auto merge of #140527 - GuillaumeGomez:doctest-main-fn, r=notriddle
Emit a warning if the doctest `main` function will not be run

Fixes #140310.

I think we could try to go much further like adding a "link" (ie UI annotations) on the `main` function in the doctest. However that will require some more computation, not sure if it's worth it or not. Can still be done in a follow-up if we want it.

For now, this PR does two things:
1. Pass the `DiagCtxt` to the doctest parser to emit the warning.
2. Correctly generate the `Span` to where the doctest is starting (I hope the way I did it isn't too bad either...).

cc `@fmease`
r? `@notriddle`
2025-05-22 08:40:58 +00:00
Lukas Wirth
76ee900d7c
Merge pull request #19843 from oli-obk/rust-analyzer.vs
Remove rust-analyzer.vs from other editors
2025-05-22 07:55:48 +00:00
Oli Scherer
41cf50ff91 Remove rust-analyzer.vs from other editors 2025-05-22 07:37:25 +00:00
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
Chayim Refael Friedman
f219124be6
Merge pull request #19840 from rust-lang/davidbarsky/fix-integrated-benchmarks
internal: fix `integrated_benchmarks` to make actual edits
2025-05-21 18:38:15 +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
bors
5a9238e78b Auto merge of #140386 - oli-obk:match-on-lang-item-kind, r=compiler-errors
Match on lang item kind instead of using an if/else chain

Similar to how the new solver does this. Just noticed while I was adding a new entry to the chain 😆
2025-05-21 13:31:13 +00:00
bors
01e3d81489 Auto merge of #140757 - dpaoliello:llvm20, r=Kobzol
[win][ci] Update LLVM toolchain used to build LLVM to 20

While trying to get the aarch64-msvc build working correctly (#140136), I needed to update the version of LLVM used to build LLVM in Windows CI runners to 20 (as this has improved support for Arm64 and Arm64EC on Windows).

This catches Windows up to Linux which was updated to 20 by #137189

try-job: `x86_64-apple-*`
try-job: `aarch64-apple`
try-job: `x86_64-msvc-*`
try-job: `i686-msvc-*`
try-job: `x86_64-mingw-*`
2025-05-20 19:29:34 +00:00
bors
b2d7d47981 Auto merge of #140932 - onur-ozkan:llvm-tools, r=Kobzol
update llvm-tools logic for `dist` and `install` steps

First commit aligns `build_steps::compile` and `build_steps::dist` logics for copying llvm-tools, and the second commit adds the correct `should_run` condition for `LlvmTools` step as the previous one was clearly incorrect.

Fixes #140913
2025-05-20 12:44:14 +00:00
bors
a8e438f925 Auto merge of #141278 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-05-20 09:28:44 +00: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
Laurențiu Nicola
d7bcb5ce76 Preparing for merge from rust-lang/rust 2025-05-20 10:00:23 +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
052b5b46ac
Merge pull request #19814 from Veykril/lw-sxquntxksovs
Debounce workspace fetching for workspace structure changes
2025-05-19 07:06:10 +00:00