Commit Graph

291081 Commits

Author SHA1 Message Date
Trevor Gross
ae952460d3 Rollup merge of #141548 - bvanjoi:issue-141256, r=petrochenkov
consider glob imports in cfg suggestion

Fixes rust-lang/rust#141256

r? ```@petrochenkov```
2025-05-28 10:28:10 -04:00
Trevor Gross
77c7f76297 Rollup merge of #141411 - lolbinarycat:rustdoc-link-proc-macro-91274, r=GuillaumeGomez
rustdoc: linking to a local proc macro no longer warns

fixes https://github.com/rust-lang/rust/issues/91274

tried to keep the fix general in case we ever have any other kind of item that occupies
multiple namespaces simultaniously.
2025-05-28 10:28:09 -04:00
Trevor Gross
1ead0a5ef3 Rollup merge of #141404 - bjorn3:refactor_cg_ssa_call_codegen, r=davidtwco
Improve intrinsic handling in cg_ssa

* Move all intrinsic handling code to the start of `codegen_call_terminator`.
* Push some intrinsic handling code into `codegen_intrinsic_call`.
* Don't depend on FnAbi for intrinsics.
2025-05-28 10:28:09 -04:00
Trevor Gross
7f5f29b663 Rollup merge of #140697 - Sa4dUs:split-autodiff, r=ZuseZ4
Split `autodiff` into `autodiff_forward` and `autodiff_reverse`

This PR splits `#[autodiff]` macro so `#[autodiff(df, Reverse, args)]` would become `#[autodiff_reverse(df, args)]` and `#[autodiff(df, Forward, args)]` would become `#[autodiff_forwad(df, args)]`.
2025-05-28 10:28:08 -04:00
Trevor Gross
5f17779a03 Rollup merge of #140369 - jplatte:mutex-rwlock-data-ptr, r=Amanieu
Add data_ptr method to Mutex and RwLock

Implementation of https://github.com/rust-lang/rust/issues/140368 / https://github.com/rust-lang/libs-team/issues/531.

I tried to write a useful safety section about when it is safe to read or write through the returned pointers, but couldn't come up with something nice. Hoping this PR is still useful without that. I'm happy to add any doc strings other people come up with if needed before merge, of course.

Unresolved questions:

- Return a `LockResult` or not?
- Return `*mut T` like existing APIs (`Cell::as_ptr` / `MaybeUninit::as[_mut]_ptr` / `Vec::as_ptr` / ...) or be more precise and return `NonNull<T>`?
2025-05-28 10:28:07 -04:00
bors
40311c4dcf Auto merge of #141576 - marcoieni:pr-free-runners-aarch, r=Kobzol
ci: move tests from x86_64-gnu-llvm-19 job to aarch64
2025-05-28 14:20:52 +00:00
beetrees
1d903b6d10 Stabilise repr128 2025-05-28 15:14:34 +01:00
beetrees
467eeabbb5 Stabilise repr128 2025-05-28 15:14:34 +01:00
Ralf Jung
2593df8837 core: unstably expose atomic_compare_exchange so stdarch can use it 2025-05-28 15:20:29 +02:00
León Orell Valerian Liehr
9f12748086 GCI: Check where-clauses for well-formedness at the def site 2025-05-28 15:19:32 +02:00
Patrick-6
149b5b2567 Make pthread Mutex internals less public 2025-05-28 15:13:38 +02:00
Patrick-6
2e99a880e2 Add diagnostic items to sys::Mutex 2025-05-28 15:12:56 +02:00
Orson Peters
f70cf59fc1 Improve safety comment, double-drop is not relevant here 2025-05-28 14:51:52 +02:00
Raoul Strackx
eb0a3c081d Update SGX maintainers 2025-05-28 14:42:03 +02:00
Orson Peters
b0f6b69b81 Do not move thread-locals before dropping 2025-05-28 14:39:51 +02:00
Vadim Petrochenkov
d88641f8bc rustbook: Bump versions of onig and onig_sys
This fixes the build on GCC 15
2025-05-28 15:36:32 +03:00
Michael Goulet
3a736e2726 Handle e2021 precise capturing of unsafe binder 2025-05-28 12:17:18 +00:00
Nia Espera
bcebf58acc interpret/allocation: make alloc fn be FnOnce 2025-05-28 13:16:20 +02:00
David Klank
9389daab8d replace TraitRef link memory.md 2025-05-28 13:50:38 +03:00
Oli Scherer
0fdc38eefe Merge pull request #4344 from CraftSpider/windows-file-clone
Implement file cloning on Windows
2025-05-28 10:38:42 +00:00
Samuel Tardieu
551870df96 Extend manual_is_variant_and lint to check for boolean map comparisons (#14646)
Fixes rust-lang/rust-clippy#14542.

changelog: [`manual_is_variant_and`]: Extend to check for boolean map
comparisons

r? @samueltardieu
2025-05-28 10:25:11 +00:00
Paul Mabileau
0dd5722d67 Test(fs): Fix test_eq_windows_file_type for Windows 7
Would otherwise fail on:

```
thread 'fs::tests::test_eq_windows_file_type' panicked at library/std/src/test_helpers.rs:53:20:
called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }
```

This came from the read-only attribute set on the test file. In order to
fix this, instead of simply disabling the test, the attribute is reset
before the test's end so it may still run successfully.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-28 12:06:25 +02:00
Oli Scherer
013ab6cdb1 Use builin_index instead of hand-rolling it 2025-05-28 10:03:01 +00:00
Oli Scherer
550aed825b Use builin_index instead of hand-rolling it 2025-05-28 10:03:01 +00:00
Lukas Wirth
d08ab512dd Merge pull request #19881 from Veykril/push-wsrmttkymyps
feat: Desugar assist for `let pat = expr?;` -> `let else`
2025-05-28 09:23:27 +00:00
Lukas Wirth
8231d888cf feat: Desugar assist for let pat = expr?; -> let else 2025-05-28 11:12:28 +02:00
bors
77101febcc Auto merge of #141501 - marcoieni:dist-x86_64-linux-codebuild-again, r=Kobzol
ci: move dist-x86_64-linux job to codebuild
2025-05-28 08:58:49 +00:00
Lukas Wirth
c205ef756d Merge pull request #19880 from Veykril/push-xmpxumsrkymk
fix: Handle included files better in IDE layer
2025-05-28 08:49:42 +00:00
Lukas Wirth
035cf40337 Merge pull request #19872 from ChayimFriedman2/async-fn-output
fix: Fix inference of `AsyncFnX` return type
2025-05-28 08:39:14 +00:00
Lukas Wirth
457e84f4d8 fix: Handle included files better in IDE layer
This does not fully fix things, but it introduces a function that can be used to fix occurences.
When using `to_def` functionality, the input node needs to come from the macro expanded include, not the real file that was included.
This does unfortunately add more caller burden, but there is not really a way around it.
2025-05-28 10:38:38 +02:00
MarcoIeni
bf52d1a803 ci: verify that codebuild jobs use ghcr.io 2025-05-28 10:23:38 +02:00
Lukas Wirth
fa22119b38 Merge pull request #19876 from ShoyuVanilla/layout-padding
feat: Render padding information when hovering on structs
2025-05-28 08:16:38 +00:00
Jakub Beránek
cd4f199db2 Revert "increase perf of charsearcher for single ascii characters"
This reverts commit 245bf503e2.
2025-05-28 09:29:12 +02:00
Nicholas Nethercote
ac33068f9f Avoid over-counting of UsePath in the HIR stats. 2025-05-28 17:02:39 +10:00
Nicholas Nethercote
7fff1141f2 Filter percentages out of tests/ui/stats/input-stats.rs output.
This will make future diffs to this file much easier to read.
2025-05-28 16:58:51 +10:00
Trevor Gross
19fd098446 float: Disable total_cmp sNaN tests for f16
There is an LLVM bug with lowering of basic `f16` operations that mean a
round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple
`abs` calls or bitcasts [1]. This is problematic because the round trip
quiets signaling NaNs. For most operations this is acceptable, but it is
causing `total_cmp` tests to fail unless optimizations are enabled.

Disable `total_cmp` tests involving signaling NaNs until this issue is
resolved.

Fixes: https://github.com/rust-lang/rustc_codegen_cranelift/issues/1578
Fixes: https://github.com/rust-lang/rust/issues/141503

[1]: https://github.com/llvm/llvm-project/issues/104915
2025-05-28 06:49:04 +00:00
Ralf Jung
bb976bc43b Merge pull request #4353 from rust-lang/rustup-2025-05-28
Automatic Rustup
2025-05-28 06:45:44 +00:00
Ralf Jung
98485a89f8 Merge pull request #4351 from RalfJung/squash-win
attempt to fix squash on Windows
2025-05-28 06:33:28 +00:00
Ralf Jung
e0ff77aea5 coretests: add abs() and copysign() tests, and remove now-unnecessary ui test 2025-05-28 08:32:08 +02:00
Ralf Jung
2a9363e593 coretests: simplify test_float macro to derive more things from the type name 2025-05-28 08:30:14 +02:00
bors
cb678b94c3 Auto merge of #141375 - kraj:kraj/aarch64-musl, r=Mark-Simulacrum
Disable libunwind cross-architecture unwinding

Building with _LIBUNWIND_IS_NATIVE_ONLY disables code for cross-architecture unwinding It also enables some additional code that handles PAC-specific unwind info it helps compiling with the -mbranch-protection=pac or -mbranch-protection=standard flags

This fixes build with clang/musl on aarch64
2025-05-28 05:49:08 +00:00
Nicholas Nethercote
cb27c8af94 Reorder ast::ItemKind::{Struct,Enum,Union} fields.
So they match the order of the parts in the source code, e.g.:
```
struct Foo<T, U> { t: T, u: U }
       <-><----> <------------>
       /   |       \
   ident generics  variant_data
```
2025-05-28 15:48:45 +10:00
Nicholas Nethercote
4c4a40f6df Reorder ast::ItemKind::{Struct,Enum,Union} fields.
So they match the order of the parts in the source code, e.g.:
```
struct Foo<T, U> { t: T, u: U }
       <-><----> <------------>
       /   |       \
   ident generics  variant_data
```
2025-05-28 15:48:45 +10:00
Lukas Wirth
7840bc0ea1 Merge pull request #19879 from Veykril/push-mqykxnqtktuw
fix: Fix IDE layer not resolving some macro calls
2025-05-28 05:20:02 +00:00
Shoyu Vanilla
636495cdec feat: Render padding information when hovering on structs 2025-05-28 14:18:50 +09:00
Lukas Wirth
7ec351ec7c Back out "Fix IDE resolution of item macros"
This backs out commit 3e0ab7219a5464999652beca22698cd46e1e48e8.
2025-05-28 07:09:21 +02:00
Lukas Wirth
711546a329 Drop unnecessay code 2025-05-28 07:05:55 +02:00
The Miri Cronjob Bot
15f0fb03bb Merge from rustc 2025-05-28 05:00:57 +00:00
Lukas Wirth
cfe488c7a0 fix: Fix IDE layer not resolving some macro calls 2025-05-28 06:58:40 +02:00
The Miri Cronjob Bot
9d9206c398 Preparing for merge from rustc 2025-05-28 04:53:47 +00:00