bors
af15612448
Auto merge of #143601 - matthiaskrgr:rollup-9iw2sqk, r=matthiaskrgr
...
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#132469 (Do not suggest borrow that is already there in fully-qualified call)
- rust-lang/rust#143340 (awhile -> a while where appropriate)
- rust-lang/rust#143438 (Fix the link in `rustdoc.md`)
- rust-lang/rust#143539 (Regression tests for repr ICEs)
- rust-lang/rust#143566 (Fix `x86_64-unknown-netbsd` platform support page)
- rust-lang/rust#143572 (Remove unused allow attrs)
- rust-lang/rust#143583 (`loop_match`: fix 'no terminator on block')
- rust-lang/rust#143584 (make `Machine::load_mir` infallible)
- rust-lang/rust#143591 (Fix missing words in future tracking issue)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-07 20:30:53 +00:00
Matthias Krüger
5b0bebbdad
Rollup merge of #143591 - ehuss:future-typos, r=jieyouxu
...
Fix missing words in future tracking issue
Fixes some sloppy editing on my part.
2025-07-07 19:55:37 +02:00
Matthias Krüger
dbadd94323
Rollup merge of #143584 - fee1-dead-contrib:push-skswvrwsrmll, r=RalfJung
...
make `Machine::load_mir` infallible
it doesn't need to return an `InterpResult`.
2025-07-07 19:55:36 +02:00
Matthias Krüger
d08465b50e
Rollup merge of #143583 - folkertdev:loop-match-no-terminator-on-block, r=bjorn3
...
`loop_match`: fix 'no terminator on block'
tracking issue: https://github.com/rust-lang/rust/issues/132306
fixes https://github.com/rust-lang/rust/issues/143435
The argument `block` was not properly closed on an error path.
r? `@bjorn3`
2025-07-07 19:55:35 +02:00
Matthias Krüger
1693eac9a4
Rollup merge of #143572 - yotamofek:pr/unused-allow-attrs, r=fee1-dead
...
Remove unused allow attrs
These `#[allow]`s seem to be unused (at least according to `x check`, didn't run `x test` locally). Let's clean them up! 🧹
2025-07-07 19:55:35 +02:00
Matthias Krüger
18612f8670
Rollup merge of #143566 - jieyouxu:fix-x86_64-unknown-netbsd, r=fee1-dead
...
Fix `x86_64-unknown-netbsd` platform support page
`x86_64-unknown-netbsd` is Tier 2 with host tools, not Tier 3.
cc `@he32.`
r? compiler
2025-07-07 19:55:34 +02:00
Matthias Krüger
d6dc3d9825
Rollup merge of #143539 - JonathanBrouwer:ice-regression-tests, r=oli-obk
...
Regression tests for repr ICEs
Closes https://github.com/rust-lang/rust/issues/143522
Closes https://github.com/rust-lang/rust/issues/143479
Both issues were already (accidentally) fixed in this PR, but having the tests is nice https://github.com/rust-lang/rust/pull/143252
r? `@jdonszelmann`
2025-07-07 19:55:33 +02:00
Matthias Krüger
818b0d76e0
Rollup merge of #143438 - makai410:rustdoc-fix, r=ehuss
...
Fix the link in `rustdoc.md`
2025-07-07 19:55:33 +02:00
Matthias Krüger
23584a4666
Rollup merge of #143340 - nabijaczleweli:awhile, r=mati865
...
awhile -> a while where appropriate
2025-07-07 19:55:32 +02:00
Matthias Krüger
36929fb177
Rollup merge of #132469 - estebank:issue-132041, r=Nadrieril
...
Do not suggest borrow that is already there in fully-qualified call
When encountering `&str::from("value")` do not suggest `&&str::from("value")`.
Fix #132041 .
2025-07-07 19:55:31 +02:00
bors
b00b4ea65b
Auto merge of #143182 - xdoardo:more-addrspace, r=workingjubilee
...
Allow custom default address spaces and parse `p-` specifications in the datalayout string
Some targets, such as CHERI, use as default an address space different from the "normal" default address space `0` (in the case of CHERI, [200 is used](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-877.pdf )). Currently, `rustc` does not allow to specify custom address spaces and does not take into consideration [`p-` specifications in the datalayout string](https://llvm.org/docs/LangRef.html#langref-datalayout ).
This patch tries to mitigate these problems by allowing targets to define a custom default address space (while keeping the default value to address space `0`) and adding the code to parse the `p-` specifications in `rustc_abi`. The main changes are that `TargetDataLayout` now uses functions to refer to pointer-related informations, instead of having specific fields for the size and alignment of pointers in the default address space; furthermore, the two `pointer_size` and `pointer_align` fields in `TargetDataLayout` are replaced with an `FxHashMap` that holds info for all the possible address spaces, as parsed by the `p-` specifications.
The potential performance drawbacks of not having ad-hoc fields for the default address space will be tested in this PR's CI run.
r? workingjubilee
2025-07-07 17:28:14 +00:00
bors
7d6f447a4d
Auto merge of #143035 - ywxt:less-work-steal, r=oli-obk
...
Only work-steal in the main loop for rustc_thread_pool
This PR is a replica of <https://github.com/rust-lang/rustc-rayon/pull/12 > that only retained work-steal in the main loop for rustc_thread_pool.
r? `@oli-obk`
cc `@SparrowLii` `@Zoxc` `@cuviper`
Updates rust-lang/rust#113349
2025-07-07 11:16:16 +00:00
bors
1bc1f34608
Auto merge of #143565 - lnicola:sync-from-ra, r=lnicola
...
Subtree update of `rust-analyzer`
r? `@ghost`
2025-07-07 08:14:30 +00:00
Edoardo Marangoni
54507d88b4
compiler: Parse p- specs in datalayout string, allow definition of custom default data address space
2025-07-07 09:04:53 +02:00
bors
17de9984d5
Auto merge of #141829 - dvdsk:sleep_until_linux, r=cuviper,RalfJung
...
Specialize sleep_until implementation for unix (except mac)
related tracking issue: https://github.com/rust-lang/rust/issues/113752
Supersedes https://github.com/rust-lang/rust/pull/118480 for the reasons see: https://github.com/rust-lang/rust/issues/113752#issuecomment-2902594469
Replaces the generic catch all implementation with target_os specific ones for: linux/netbsd/freebsd/android/solaris/illumos etc. Other platforms like wasi, macos/ios/tvos/watchos and windows will follow in later separate PR's (once this is merged).
2025-07-06 23:00:51 +00:00
Lukas Wirth
0ac65592a8
Merge pull request #20184 from Veykril/push-ywpynxnltpok
...
metrics / build_metrics (push) Has been cancelled
rustdoc / rustdoc (push) Has been cancelled
metrics / other_metrics (diesel-1.4.8) (push) Has been cancelled
metrics / other_metrics (hyper-0.14.18) (push) Has been cancelled
metrics / other_metrics (ripgrep-13.0.0) (push) Has been cancelled
metrics / other_metrics (self) (push) Has been cancelled
metrics / other_metrics (webrender-2022) (push) Has been cancelled
metrics / generate_final_metrics (push) Has been cancelled
release / dist (aarch64-unknown-linux-gnu) (push) Has been cancelled
release / dist (arm-unknown-linux-gnueabihf) (push) Has been cancelled
release / dist (x86_64-unknown-linux-gnu) (push) Has been cancelled
release / dist (aarch64-pc-windows-msvc) (push) Has been cancelled
release / dist (x86_64-pc-windows-msvc) (push) Has been cancelled
release / dist (i686-pc-windows-msvc) (push) Has been cancelled
autopublish / publish (push) Has been cancelled
release / publish (push) Has been cancelled
release / dist (aarch64-apple-darwin) (push) Has been cancelled
release / dist (x86_64-apple-darwin) (push) Has been cancelled
release / dist (x86_64-unknown-linux-musl) (push) Has been cancelled
chore: Remove dead field from `InferenceContext`
2025-07-06 09:08:36 +00:00
Lukas Wirth
c86d83219b
chore: Remove dead field from InferenceContext
2025-07-06 10:57:06 +02:00
Lukas Wirth
2691c11104
Merge pull request #20132 from A4-Tacks/asmut-borrow-minicore
...
Add AsMut, Borrow and BorrowMut to minicore and famous_defs
2025-07-06 08:01:54 +00:00
Lukas Wirth
fce1f41462
Merge pull request #20126 from Wilfred/no_unwrap_in_discover_projects
...
fix: Avoid .unwrap() when running the discover command
2025-07-06 08:01:10 +00:00
Lukas Wirth
ef3e52b6eb
Merge pull request #20179 from ChayimFriedman2/destructuring-assignment-never
...
fix: Fix diverging destructuring assignments
2025-07-06 07:01:40 +00:00
Chayim Refael Friedman
694cd75f50
Merge pull request #20175 from dianne/match-check-box-cleanup
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
`hir_ty::match_check` cleanup: remove special handling for box patterns
2025-07-06 02:32:49 +00:00
Chayim Refael Friedman
2d518c73d9
Merge pull request #20172 from vxpm/syntax-tree-extension
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
remove `rust-analyzer/syntaxTree` from docs
2025-07-05 19:43:19 +00:00
Chayim Refael Friedman
3ec0d80ae1
Fix diverging destructuring assignments
...
They need to return `!`, unlike diverging ordinary assignments. See the comment in the code.
2025-07-05 22:35:22 +03:00
A4-Tacks
439f2d24cd
Fix Borrow and BorrowMut define from beta std
2025-07-05 21:49:56 +08:00
dianne
8dc54f4d33
hir_ty::match_check: remove special handling for box patterns
2025-07-04 23:43:49 -07:00
vinícius x
6e86abc99a
remove syntaxTree from docs
2025-07-04 14:27:03 -03:00
Wilfred Hughes
a50b7b6b4e
fix: Avoid .unwrap() when running the discover command
...
Previously, the following configuration in settings.json:
"rust-analyzer.workspace.discoverConfig": {
"command": [
"oops",
"develop-json",
"{arg}"
],
"progressLabel": "rust-analyzer",
"filesToWatch": [
"BUCK",
"TARGETS"
]
},
Would previously cause a crash in rust-analyzer:
thread 'LspServer' panicked at crates/rust-analyzer/src/main_loop.rs:776:84:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Instead, use more specific panic messages.
2025-07-04 16:55:53 +01:00
Laurențiu Nicola
3816d0ae53
Merge pull request #20170 from Veykril/push-vtsmzopsunsw
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Improve flycheck and build script progress reporting
2025-07-04 13:46:09 +00:00
bors
849b884684
Auto merge of #143247 - cjgillot:metadata-no-red, r=petrochenkov
...
Avoid depending on forever-red DepNode when encoding metadata.
Split from https://github.com/rust-lang/rust/pull/114669 for perf
r? `@petrochenkov`
2025-07-04 10:23:18 +00:00
Lukas Wirth
4ee90e97f6
Improve flycheck and build script progress reporting
2025-07-04 11:52:09 +02:00
Lukas Wirth
b7fc040576
Merge pull request #20169 from Veykril/push-quvvsupnqqwv
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Skip unnecessary `eq` work in `BodySourceMap`
2025-07-04 09:47:36 +00:00
Lukas Wirth
638e49b0fc
Skip unnecessary eq work in BodySourceMap
2025-07-04 11:36:06 +02:00
Lukas Wirth
da1888a75c
Merge pull request #20031 from jnyfah/some-branch
...
Fix: Resolve HIR display length issues and improve adjustment tooltips
2025-07-04 09:20:14 +00:00
Lukas Wirth
37a7734af6
Merge pull request #20168 from Veykril/push-wsozylrmsyns
...
minor: Handle match arm commas in `make::match_arm`
2025-07-04 09:19:22 +00:00
Lukas Wirth
2c01609d6d
minor: Handle match arm commas in make::match_arm
...
Co-authored-by: Giga Bowser <45986823+Giga-Bowser@users.noreply.github.com>
2025-07-04 11:08:28 +02:00
Lukas Wirth
4183bcdcde
Merge pull request #20148 from ShoyuVanilla/sysroot-no-deps
...
fix: Honor `rust-analyzer.cargo.noDeps` option when fetching sysroot metadata
2025-07-04 08:03:25 +00:00
Lukas Wirth
d91030153c
Merge pull request #20165 from Hmikihiro/migrate-unmerge_match_arm
...
Migrate `unmerge_match_arm` Assist to use `SyntaxEditor`
2025-07-04 08:02:58 +00:00
Lukas Wirth
e9504252b8
Merge pull request #20167 from ChayimFriedman2/enum-derive-default
...
fix: Fix some things with builtin derives
2025-07-04 07:59:14 +00:00
bors
960f246757
Auto merge of #142890 - kornelski:unused-var-debug, r=saethlin
...
MIR inliner maintains unused var_debug_info
Only `full` debuginfo level promises variable-level debug information, but the MIR inline pass needlessly preserved the local variable debug info for the `limited` level too.
2025-07-03 23:17:03 +00:00
Chayim Refael Friedman
040049b799
Merge pull request #20144 from regexident/load-workspace-into-db
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Add `fn load_workspace_into_db` variant for `ra_ap_load_cargo`'s `fn load_workspace`
2025-07-03 23:08:37 +00:00
Vincent Esche
a0e857f7bc
Add fn load_workspace_into_db variant for ra_ap_load_cargo's fn load_workspace
2025-07-03 23:09:49 +02:00
Chayim Refael Friedman
9c4a7705b1
Fix some things with builtin derives
...
1. Err on unions on derive where it's required.
2. Err on `#[derive(Default)]` on enums without `#[default]` variant.
3. Don't add where bounds `T: Default` when expanding `Default` on enums (structs need that, enums not).
Also, because I was annoyed by that, in minicore, add a way to filter on multiple flags in the line-filter (`// :`). This is required for the `Debug` and `Hash` derives, because the derive should be in the prelude but the trait not.
2025-07-03 23:05:56 +03:00
Hayashi Mikihiro
c0ca61b8ff
Migrate unmerge_match_arm Assist to use SyntaxEditor
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-04 02:32:55 +09:00
Lukas Wirth
87940a999f
Merge pull request #20161 from ShoyuVanilla/closure-capture
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
fix: Incorrect closure capturing for let exprs
2025-07-03 15:42:11 +00:00
Chayim Refael Friedman
c0d9c95926
Merge pull request #20120 from Hmikihiro/match_bind_not_type
...
fix: resolve item in match bind
2025-07-03 15:27:07 +00:00
Hayashi Mikihiro
07a1b4e69f
fix: resolve item in match bind
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-03 23:57:18 +09:00
Shoyu Vanilla
f3eb22edd0
fix: Closure capturing for let exprs, again
2025-07-03 22:51:16 +09:00
Lukas Wirth
f14bf95931
Merge pull request #20160 from Veykril/push-pqvskktpnylu
...
fix: Improve diagnostic ranges for `macro_calls!`
2025-07-03 12:23:23 +00:00
Lukas Wirth
2480a42ff4
fix: Improve diagnostic ranges for macro_calls!
...
We used to point to the entire macro call including its token tree if we couldn't upmap the diagnostic to the input
This generally makes things very noisy as the entire macro call will turn red on errors.
Instead, we now macro the path and `!` (bang) token as the error source range which is a lot nicer on the eyes.
2025-07-03 14:12:27 +02:00
Lukas Wirth
292ab7cf95
Merge pull request #20159 from Veykril/push-kyssnlrxlwsl
...
Always couple `--compile-time-deps` with
2025-07-03 11:03:36 +00:00