1
Fork 0
Commit graph

285849 commits

Author SHA1 Message Date
Michael Goulet
253da2f22b Don't call Span.with_parent on the good path in has_stashed_diagnostic 2025-04-07 05:37:25 +00:00
bors
25a615bf82 Auto merge of #138951 - jwnrt:alloc-raw-vec-strict-prov, r=Noratrieb
Replace last `usize` -> `ptr` transmute in `alloc` with strict provenance API

This replaces the `usize -> ptr` transmute in `RawVecInner::new_in` with a strict provenance API (`NonNull::without_provenance`).

The API is changed to take an `Alignment` which encodes the non-null constraint needed for `Unique` and allows us to do the construction safely.

Two internal-only APIs were added to let us avoid UB-checking in this hot code: `Layout::alignment` to get the `Alignment` type directly rather than as a `usize`, and `Unique::from_non_null` to create `Unique` in const context without a transmute.
2025-04-06 23:07:48 +00:00
bors
2fa8b11f09 Auto merge of #136077 - rust-lang:cargo_update, r=clubby789
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt

compiler & tools dependencies:
     Locking 11 packages to latest compatible versions
    Updating blake3 v1.8.0 -> v1.8.1
    Updating ctrlc v3.4.5 -> v3.4.6
    Updating env_logger v0.11.7 -> v0.11.8
    Updating errno v0.3.10 -> v0.3.11
    Updating flate2 v1.1.0 -> v1.1.1
    Updating indexmap v2.8.0 -> v2.9.0
    Updating miniz_oxide v0.8.5 -> v0.8.7
    Updating openssl-sys v0.9.106 -> v0.9.107
    Updating redox_syscall v0.5.10 -> v0.5.11
    Updating smallvec v1.14.0 -> v1.15.0
    Updating tokio v1.44.1 -> v1.44.2
note: pass `--verbose` to see 40 unchanged dependencies behind latest

library dependencies:
     Locking 1 package to latest compatible version
    Updating miniz_oxide v0.8.5 -> v0.8.7
note: pass `--verbose` to see 4 unchanged dependencies behind latest

rustbook dependencies:
     Locking 30 packages to latest compatible versions
    Updating cc v1.2.17 -> v1.2.18
    Updating clap v4.5.32 -> v4.5.35
    Updating clap_builder v4.5.32 -> v4.5.35
    Updating darling v0.20.10 -> v0.20.11
    Updating darling_core v0.20.10 -> v0.20.11
    Updating darling_macro v0.20.10 -> v0.20.11
    Updating env_logger v0.11.7 -> v0.11.8
    Updating errno v0.3.10 -> v0.3.11
    Updating flate2 v1.1.0 -> v1.1.1
    Updating iana-time-zone v0.1.61 -> v0.1.63
    Updating icu_locid_transform_data v1.5.0 -> v1.5.1
    Updating icu_normalizer_data v1.5.0 -> v1.5.1
    Updating icu_properties_data v1.5.0 -> v1.5.1
    Updating indexmap v2.8.0 -> v2.9.0
    Updating log v0.4.26 -> v0.4.27
    Updating miniz_oxide v0.8.5 -> v0.8.7
    Updating once_cell v1.21.1 -> v1.21.3
    Updating pest v2.7.15 -> v2.8.0
    Updating pest_derive v2.7.15 -> v2.8.0
    Updating pest_generator v2.7.15 -> v2.8.0
    Updating pest_meta v2.7.15 -> v2.8.0
    Updating redox_syscall v0.5.10 -> v0.5.11
    Updating rustix v1.0.3 -> v1.0.5
    Updating smallvec v1.14.0 -> v1.15.0
    Updating string_cache v0.8.8 -> v0.8.9
    Updating windows-core v0.52.0 -> v0.61.0
      Adding windows-implement v0.60.0
      Adding windows-interface v0.59.1
      Adding windows-result v0.3.2
      Adding windows-strings v0.4.0
```
2025-04-06 19:57:47 +00:00
bors
fd4dc18e68 Auto merge of #139452 - GuillaumeGomez:rollup-u9edkjo, r=GuillaumeGomez
Rollup of 6 pull requests

Successful merges:

 - #138562 (Optimize slice {Chunks,Windows}::nth)
 - #138876 (Trusty: Implement `write_vectored` for stdio )
 - #139072 (Add `slice::align_to_uninit_mut`)
 - #139367 (Add `*_value` methods to proc_macro lib)
 - #139391 (Check if merged attributes list is empty in expr)
 - #139414 (Fix typo in `RawList`'s documentation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-06 16:46:30 +00:00
Guillaume Gomez
b3e051aced
Rollup merge of #139414 - Adamkob12:fix_typo_raw_list, r=Nadrieril
Fix typo in `RawList`'s documentation
2025-04-06 18:08:11 +02:00
Guillaume Gomez
b1d67b2492
Rollup merge of #139391 - TaKO8Ki:check-if-merged-attrs-list-is-empty, r=jdonszelmann
Check if merged attributes list is empty in expr

Fixes #139373

In the example code, an [`UnrecognizedReprHint`](6b5ccfc87f/compiler/rustc_attr_parsing/src/attributes/repr.rs (L155)) error is output, and the list of merged attributes becomes empty. This causes a [panic](6b5ccfc87f/compiler/rustc_ast_lowering/src/lib.rs (L618)) to occur. So, it's necessary to check if merged attributes list is empty as other functions do.

ref: 6b5ccfc87f/compiler/rustc_ast_lowering/src/lib.rs (L896)
2025-04-06 18:08:11 +02:00
Guillaume Gomez
ed81e347f1
Rollup merge of #139367 - GuillaumeGomez:proc-macro-values, r=Urgau
Add `*_value` methods to proc_macro lib

This is the (re-)implementation of https://github.com/rust-lang/libs-team/issues/459.

It allows to get the actual value (unescaped) of the different string literals.

It was originally done in https://github.com/rust-lang/rust/pull/136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation.

Part of https://github.com/rust-lang/rust/issues/136652.

Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/

r? `@Urgau`
2025-04-06 18:08:10 +02:00
Guillaume Gomez
d1da78b201
Rollup merge of #139072 - nickkuk:align_to_uninit_mut, r=Mark-Simulacrum
Add `slice::align_to_uninit_mut`

Add new `slice::align_to_uninit_mut` method.

Tracking issue: https://github.com/rust-lang/rust/issues/139062

ACP: https://github.com/rust-lang/libs-team/issues/564
2025-04-06 18:08:10 +02:00
Guillaume Gomez
962fa98eeb
Rollup merge of #138876 - thaliaarchi:trusty-stdio, r=Noratrieb
Trusty: Implement `write_vectored` for stdio

Currently, `write` for stdout and stderr on Trusty is implemented with the semantics of `write_all`. Instead, call the underlying syscall only once in `write` and use the default implementation of `write_all` like other platforms. Also, implement `write_vectored` by adding support for `IoSlice`.

Refactor stdin to reuse the unsupported type like https://github.com/rust-lang/rust/pull/136769.

It requires #138875 to fix the build for Trusty, though they do not conflict and can merge in either order.

cc `@randomPoison`
2025-04-06 18:08:09 +02:00
Guillaume Gomez
7bd89b90e8
Rollup merge of #138562 - kornelski:nth-panic, r=Noratrieb
Optimize slice {Chunks,Windows}::nth

I've noticed that the `nth` functions on slice iters had non-optimized-out bounds checks.

The new implementation even generates branchless code.
2025-04-06 18:08:08 +02:00
bors
175dcc7773 Auto merge of #139439 - weihanglo:update-cargo, r=weihanglo
Update cargo

17 commits in a6c604d1b8a2f2a8ff1f3ba6092f9fda42f4b7e9..0e93c5bf6a1d5ee7bc2af63d1afb16cd28793601
2025-03-26 18:11:00 +0000 to 2025-04-05 00:00:24 +0000
- chore(deps): bump openssl from 0.10.71 to 0.10.72 (rust-lang/cargo#15394)
- chore(ci): restore cargo-util semver check (rust-lang/cargo#15389)
- docs(changelog): polish changelog items (rust-lang/cargo#15379)
- chore(deps): update msrv (1 version) to v1.86 (rust-lang/cargo#15381)
- chore: add aarch64 linux runner (rust-lang/cargo#15077)
- Added `build_directory` field to cargo metadata output (rust-lang/cargo#15377)
- chore(deps): update rust crate rusqlite to 0.34.0 (rust-lang/cargo#15373)
- Prevent undeclared public network access (rust-lang/cargo#15368)
- rename the `author` field to be `authors` in book.toml (rust-lang/cargo#15362)
- move modules from kebab-case to snake_case (rust-lang/cargo#14439)
- chore: bump to 0.89.0; update changelog (rust-lang/cargo#15372)
- docs(unstable): update `-Zrustdoc-depinfo` tracking issue link (rust-lang/cargo#15371)
- fix(tree): Make output more deterministic (rust-lang/cargo#15369)
- feat: rustdoc depinfo rebuild detection via -Zrustdoc-depinfo (rust-lang/cargo#15359)
- Rename the gc config table (rust-lang/cargo#15367)
- Revert "Temporarily ignore cargo_test_doctest_xcompile_ignores" (rust-lang/cargo#15357)
- Don't canonicalize executable path in `cargo_exe` (rust-lang/cargo#15355)

r? ghost
2025-04-06 13:23:48 +00:00
bors
f5c510260b Auto merge of #138947 - madsmtm:refactor-apple-versions, r=Noratrieb
Refactor Apple version handling in the compiler

Move various Apple version handling code in the compiler out `rustc_codegen_ssa` and into a place where it can be accessed by `rustc_attr_parsing`, which I found to be necessary when doing https://github.com/rust-lang/rust/pull/136867. Thought I'd split it out to make it easier to land, and to make further changes like https://github.com/rust-lang/rust/pull/131477 have fewer conflicts / PR dependencies.

There should be no functional changes in this PR.

`@rustbot` label O-apple
r? rust-lang/compiler
2025-04-06 10:16:28 +00:00
bors
e7df5b055d Auto merge of #139443 - Zalathar:rollup-c54pncs, r=Zalathar
Rollup of 3 pull requests

Successful merges:

 - #139123 (tidy: Fix paths to `coretests` and `alloctests`)
 - #139347 (Only build `rust_test_helpers` for `{incremental,ui}` test suites)
 - #139438 (Prevent a test from seeing forbidden numbers in the rustc version)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-06 07:10:05 +00:00
Stuart Cook
f4aa209e20
Rollup merge of #139438 - Zalathar:fix-test-122600, r=scottmcm
Prevent a test from seeing forbidden numbers in the rustc version

The final CHECK-NOT directive in this test was able to see past the end of the enclosing function, and find the substring `753` or `754` in the git hash in the rustc version number, causing false failures in CI whenever the git hash happens to contain those digits in sequence.

Adding an explicit check for `ret` prevents the CHECK-NOT directive from seeing past the end of the function.

---

Manually tested by adding `// CHECK-NOT: rustc` after the existing CHECK-NOT directives, and demonstrating that the new check prevents it from seeing the rustc version string.
2025-04-06 16:21:03 +10:00
Stuart Cook
f55034b2eb
Rollup merge of #139347 - jieyouxu:rust_test_helpers, r=onur-ozkan
Only build `rust_test_helpers` for `{incremental,ui}` test suites

Only build `rust_test_helpers` for `{incremental,ui}` test suites.

Context: Trying to see what test suites actually need `rust_test_helpers`, because this was causing unnecessary local failures when trying to run `./x test tests/run-make --target=wasm32-unknown-unknown` when `run-make` tests don't need `rust_test_helpers` at all.

r? `@ghost`

try-job: armhf-gnu
try-job: test-various
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: i686-mingw-1
2025-04-06 16:21:02 +10:00
Stuart Cook
fededb9906
Rollup merge of #139123 - thaliaarchi:core-alloc-test-paths, r=bjorn3
tidy: Fix paths to `coretests` and `alloctests`

Following `#135937` and `#136642`, tests for core and alloc are in coretests and alloctests. Fix tidy to lint for the new paths. Also, update comments referring to the old locations.

Some context for changes which don't match that pattern:
- `library/std/src/thread/local/dynamic_tests.rs` and `library/std/src/sync/mpsc/sync_tests.rs` were moved under `library/std/tests/` in 332fb7e6f1 (Move std::thread_local unit tests to integration tests, 2025-01-17) and b8ae372e48 (Move std::sync unit tests to integration tests, 2025-01-17), respectively, so are no longer special cases.
- There never was a `library/core/tests/fmt.rs` file. That comment previously referred to `src/test/ui/ifmt.rs`, which was folded into `library/alloc/tests/fmt.rs` in 949c96660c (move format! interface tests, 2020-09-08).

Now, the only matches for `(alloc|core)/tests` are in `compiler/rustc_codegen_{cranelift,gcc}/patches`. I don't know why CI hasn't broken because those patches can't apply. Or maybe they somehow still can apply?

r? `@bjorn3`
2025-04-06 16:21:02 +10:00
Weihang Lo
3034e571a4
Update cargo 2025-04-06 00:04:41 -04:00
Zalathar
f6afb35c61 Prevent a test from seeing forbidden numbers in the rustc version
The final CHECK-NOT directive in this test was able to see past the end of the
enclosing function, and find the substring 753 or 754 in the git hash in the
rustc version number, causing false failures in CI.

Adding an explicit check for `ret` prevents the CHECK-NOT directive from seeing
past the end of the function.
2025-04-06 12:38:20 +10:00
bors
1de931283d Auto merge of #139411 - yotamofek:pr/mir_transform/instsimplify, r=compiler-errors
In `simplify_repeated_aggregate`, don't test first element against itself

r? `@saethlin`
Noticed that in `InstSimplifyContext::simplify_repeated_aggregate`, we're accidentally evaluating the first element's value twice, and then comparing it with itself, instead of just checking whether the rest of the elements are equal to the first one.
This will probably save very few cycles, but since `InstSimplify` is always enabled, this might improve perf by a bit.
2025-04-06 01:45:33 +00:00
github-actions
d1eebd4b8c cargo update
compiler & tools dependencies:
     Locking 11 packages to latest compatible versions
    Updating blake3 v1.8.0 -> v1.8.1
    Updating ctrlc v3.4.5 -> v3.4.6
    Updating env_logger v0.11.7 -> v0.11.8
    Updating errno v0.3.10 -> v0.3.11
    Updating flate2 v1.1.0 -> v1.1.1
    Updating indexmap v2.8.0 -> v2.9.0
    Updating miniz_oxide v0.8.5 -> v0.8.7
    Updating openssl-sys v0.9.106 -> v0.9.107
    Updating redox_syscall v0.5.10 -> v0.5.11
    Updating smallvec v1.14.0 -> v1.15.0
    Updating tokio v1.44.1 -> v1.44.2
note: pass `--verbose` to see 40 unchanged dependencies behind latest

library dependencies:
     Locking 1 package to latest compatible version
    Updating miniz_oxide v0.8.5 -> v0.8.7
note: pass `--verbose` to see 4 unchanged dependencies behind latest

rustbook dependencies:
     Locking 30 packages to latest compatible versions
    Updating cc v1.2.17 -> v1.2.18
    Updating clap v4.5.32 -> v4.5.35
    Updating clap_builder v4.5.32 -> v4.5.35
    Updating darling v0.20.10 -> v0.20.11
    Updating darling_core v0.20.10 -> v0.20.11
    Updating darling_macro v0.20.10 -> v0.20.11
    Updating env_logger v0.11.7 -> v0.11.8
    Updating errno v0.3.10 -> v0.3.11
    Updating flate2 v1.1.0 -> v1.1.1
    Updating iana-time-zone v0.1.61 -> v0.1.63
    Updating icu_locid_transform_data v1.5.0 -> v1.5.1
    Updating icu_normalizer_data v1.5.0 -> v1.5.1
    Updating icu_properties_data v1.5.0 -> v1.5.1
    Updating indexmap v2.8.0 -> v2.9.0
    Updating log v0.4.26 -> v0.4.27
    Updating miniz_oxide v0.8.5 -> v0.8.7
    Updating once_cell v1.21.1 -> v1.21.3
    Updating pest v2.7.15 -> v2.8.0
    Updating pest_derive v2.7.15 -> v2.8.0
    Updating pest_generator v2.7.15 -> v2.8.0
    Updating pest_meta v2.7.15 -> v2.8.0
    Updating redox_syscall v0.5.10 -> v0.5.11
    Updating rustix v1.0.3 -> v1.0.5
    Updating smallvec v1.14.0 -> v1.15.0
    Updating string_cache v0.8.8 -> v0.8.9
    Updating windows-core v0.52.0 -> v0.61.0
      Adding windows-implement v0.60.0
      Adding windows-interface v0.59.1
      Adding windows-result v0.3.2
      Adding windows-strings v0.4.0
2025-04-06 00:23:40 +00:00
bors
c2110769cd Auto merge of #139275 - cuviper:min-llvm-19, r=nikic
Update the minimum external LLVM to 19

With this change, we'll have stable support for LLVM 19 and 20.
For reference, the previous increase to LLVM 18 was #130487.

cc `@rust-lang/wg-llvm`
r? nikic
2025-04-05 22:00:33 +00:00
Thalia Archibald
3af666ea91 tidy: Fix paths to coretests and alloctests
Following `#135937` and `#136642`, tests for core and alloc are in
coretests and alloctests. Fix tidy to lint for the new paths. Also,
update comments referring to the old locations.

Some context for changes which don't match that pattern:
* library/std/src/thread/local/dynamic_tests.rs and
  library/std/src/sync/mpsc/sync_tests.rs were moved under
  library/std/tests/ in 332fb7e6f1 (Move std::thread_local unit tests
  to integration tests, 2025-01-17) and b8ae372e48 (Move std::sync unit
  tests to integration tests, 2025-01-17), respectively, so are no
  longer special cases.
* There never was a library/core/tests/fmt.rs file. That comment
  previously referred to src/test/ui/ifmt.rs, which was folded into
  library/alloc/tests/fmt.rs in 949c96660c (move format! interface
  tests, 2020-09-08).
2025-04-05 12:15:49 -07:00
bors
5e17a2a91d Auto merge of #139417 - matthiaskrgr:rollup-ktf1d6s, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #136877 (Fix missing const for inherent pointer `replace` methods)
 - #138797 (Fix `ProvenVia` for global where clauses)
 - #139121 (Rename internal module from `statik` to `no_threads`)
 - #139319 (StableMIR: Prepare for refactoring)
 - #139404 (Small smir cleanup)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-05 18:54:05 +00:00
Josh Stone
12167d7064 Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
Guillaume Gomez
5797532940 Clean up rustc-literal-escaper usage in rust-analyzer 2025-04-05 20:06:52 +02:00
Matthias Krüger
91377bd4ca
Rollup merge of #139404 - yotamofek:pr/smir/cleanup, r=compiler-errors
Small smir cleanup

First commit might have small positive perf effect, second one is just to make code a bit shorter
2025-04-05 19:40:26 +02:00
Matthias Krüger
2769522e6e
Rollup merge of #139319 - makai410:refactor, r=celinval
StableMIR: Prepare for refactoring

Temporarily make `stable_mir` "parasitic" on the `rustc_smir` crate.

It aims to resolve the circular dependency that would arise if we directly invert the dependency order between `rustc_smir` and `stable_mir`.

Once the refactoring is complete (`rustc_smir` does not depend on `stable_mir`), we will migrate it back to the `stable_mir` crate. See more details: [here](https://hackmd.io/jBRkZLqAQL2EVgwIIeNMHg).
2025-04-05 19:40:25 +02:00
Matthias Krüger
527725b025
Rollup merge of #139121 - thaliaarchi:rename-thread_local-statik, r=Noratrieb
Rename internal module from `statik` to `no_threads`

This module is named in reference to the keyword, but the term is somewhat overloaded. Rename it to more clearly describe it and avoid the misspelling.
2025-04-05 19:40:24 +02:00
Matthias Krüger
6d88291d3c
Rollup merge of #138797 - compiler-errors:global-proven-via, r=lcnr
Fix `ProvenVia` for global where clauses

When we're merging one (or more) global where clauses in the presence of no other candidates, ensure that we return `TraitGoalProvenVia::ParamEnv` so that rigid projections work correctly. This fixes some tests with `feature(trivial_bounds)`.

Fixes #139408
2025-04-05 19:40:24 +02:00
Matthias Krüger
0b342873e3
Rollup merge of #136877 - Sky9x:const-inherent-ptr-replace, r=jhpratt
Fix missing const for inherent pointer `replace` methods

`ptr::replace` (the free fn) is already const stable. However, there are inherent convenience methods on `*mut T` and `NonNull<T>`, allowing you to write eg. `unsafe { foo.replace(bar) }` where `foo` is `*mut T` or `NonNull<T>`.

It seems const was never added to the inherent method (likely oversight), so this PR adds it.
I don't believe this needs another[^1] FCP as the inherent methods are already stable and `ptr::replace` is already const stable, so this adds no new API.

Original tracking issue: #83164
`ptr::replace` constified in #83091
`ptr::replace` const stabilized in #130954

[^1]: `const_replace` FCP completed: https://github.com/rust-lang/rust/issues/83164#issuecomment-2385670050
2025-04-05 19:40:23 +02:00
Michael Goulet
89d0e7c033 Fix ProvenVia for global where clauses 2025-04-05 16:23:25 +00:00
Adam Kobzan
e31d1d51e4 format 2025-04-05 09:09:28 -07:00
Adam Kobzan
66a273083c Fix Typo 2025-04-05 08:40:21 -07:00
Yotam Ofek
5b596cd28b In simplify_repeated_aggregate, don't test first element against itself 2025-04-05 14:01:41 +00:00
bors
0c478fdfe1 Auto merge of #139292 - compiler-errors:folder-experiment-7, r=lqd
Folder experiment: Micro-optimize RegionEraserVisitor

**NOTE:** This is one of a series of perf experiments that I've come up with while sick in bed. I'm assigning them to lqd b/c you're a good reviewer and you'll hopefully be awake when these experiments finish, lol.

r? lqd

The region eraser is very hot, so let's see if we can avoid erasing types (and visiting consts and preds that don't have region-ful types) unnecessarily.
2025-04-05 12:33:47 +00:00
Makai
707d356d00 let rustc_smir host stable_mir for refactoring 2025-04-05 18:23:07 +08:00
bors
0e9c3e52e4 Auto merge of #139401 - matthiaskrgr:rollup-uqdfj6u, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #138368 (KCFI: Add KCFI arity indicator support)
 - #138381 (Implement `SliceIndex` for `ByteStr`)
 - #139092 (Move `fd` into `std::sys`)
 - #139398 (Change notifications for Exploit Mitigations PG)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-05 09:25:41 +00:00
Yotam Ofek
33d62dd208 Dedup call to layout query 2025-04-05 08:59:49 +00:00
Yotam Ofek
89d9dd6e15 Only format! error message on failure 2025-04-05 08:59:13 +00:00
Matthias Krüger
0823b34bfb
Rollup merge of #139398 - rcvalle:rust-exploit-mitigations-pg-notifications, r=cuviper
Change notifications for Exploit Mitigations PG

Reduce the amount of notifications sent to all the Exploit Mitigations PG by removing it from some of the paths.
2025-04-05 10:18:05 +02:00
Matthias Krüger
a64ccf4a46
Rollup merge of #139092 - thaliaarchi:move-fd-pal, r=joboet
Move `fd` into `std::sys`

Move platform definitions of `fd` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276.

Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms.

Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too.

cc `@joboet,` `@ChrisDenton`

try-job: x86_64-gnu-aux
2025-04-05 10:18:04 +02:00
Matthias Krüger
56ffb43629
Rollup merge of #138381 - thaliaarchi:bstr-sliceindex, r=joshtriplett
Implement `SliceIndex` for `ByteStr`

Implement `Index` and `IndexMut` for `ByteStr` in terms of `SliceIndex`. Implement it for the same types that `&[u8]` supports (a superset of those supported for `&str`, which does not have `usize` and `ops::IndexRange`).

At the same time, move compare and index traits to a separate file in the `bstr` module, to give it more space to grow as more functionality is added (e.g., iterators and string-like ops). Order the items in `bstr/traits.rs` similarly to `str/traits.rs`.

cc `@joshtriplett`

`ByteStr`/`ByteString` tracking issue: https://github.com/rust-lang/rust/issues/134915
2025-04-05 10:18:03 +02:00
Matthias Krüger
543160dd62
Rollup merge of #138368 - rcvalle:rust-kcfi-arity, r=davidtwco
KCFI: Add KCFI arity indicator support

Adds KCFI arity indicator support to the Rust compiler (see https://github.com/rust-lang/rust/issues/138311, https://github.com/llvm/llvm-project/pull/121070, and https://lore.kernel.org/lkml/CANiq72=3ghFxy8E=AU9p+0imFxKr5iU3sd0hVUXed5BA+KjdNQ@mail.gmail.com/).
2025-04-05 10:18:03 +02:00
bors
da8321773a Auto merge of #139281 - petrochenkov:ctxtdecod6, r=wesleywiser
hygiene: Avoid recursion in syntax context decoding

#139241 has two components
- Avoiding recursion during syntax context decoding
- Encoding/decoding only the non-redundant data, and recalculating the redundant data again during decoding

Both of these parts may influence compilation times, possibly in opposite directions.
So this PR contains only the first part to evaluate its effect in isolation.
2025-04-05 06:18:04 +00:00
Ramon de C Valle
a98546b961 KCFI: Add KCFI arity indicator support
Adds KCFI arity indicator support to the Rust compiler (see rust-lang/rust#138311,
https://github.com/llvm/llvm-project/pull/121070, and
https://lore.kernel.org/lkml/CANiq72=3ghFxy8E=AU9p+0imFxKr5iU3sd0hVUXed5BA+KjdNQ@mail.gmail.com/).
2025-04-05 04:05:04 +00:00
Thalia Archibald
9b889e9198 Rename internal module from statik to no_threads
This module is named in reference to the keyword, but the term is
somewhat overloaded. Rename it to more clearly describe it and avoid the
misspelling.
2025-04-04 20:31:15 -07:00
Thalia Archibald
3ab22fabf1 Fix unsafe_op_in_unsafe_fn for Unix fd and weak 2025-04-04 20:11:08 -07:00
Thalia Archibald
4085af0183 Move fd into sys 2025-04-04 20:11:08 -07:00
bors
1e008dd5d8 Auto merge of #139396 - Zalathar:rollup-lmoqvru, r=Zalathar
Rollup of 11 pull requests

Successful merges:

 - #136457 (Expose algebraic floating point intrinsics)
 - #137880 (Autodiff batching)
 - #137897 (fix pthread-based tls on apple targets)
 - #138024 (Allow optimizing out `panic_bounds_check` in Unicode checks.)
 - #138546 (Add integer to string formatting tests)
 - #138826 (StableMIR: Add `associated_items`.)
 - #138950 (replace extra_filename with strict version hash in metrics file names)
 - #139274 (Rustdoc: typecheck settings.js)
 - #139285 (use lower case to match other error messages)
 - #139341 (Apply `Recovery::Forbidden` when reparsing pasted macro fragments.)
 - #139389 (make `Arguments::as_statically_known_str` doc(hidden))

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-05 03:09:33 +00:00
Ramon de C Valle
8c891ba222 Change notifications for Exploit Mitigations PG
Reduce the amount of notifications sent to all the Exploit Mitigations
PG by removing it from some of the paths.
2025-04-05 03:08:49 +00:00