Commit Graph

314624 Commits

Author SHA1 Message Date
Folkert de Vries 5bf9ca7b00 stabilize __jscvt 2026-01-13 12:11:18 +01:00
Sayantan Chakraborty f9e6d4bc20 Merge pull request #1987 from eduardosm/generic-simd-type-avoid-unsafe-tests
Use a generic type to implement SIMD types in `core_arch::simd` and avoid `unsafe fn` in more tests
2026-01-05 14:17:38 +00:00
usamoi 5e4168b162 partially revert https://github.com/rust-lang/rust/commit/8d597aa36528dada3cbd9bcfec889c2da6ecaaac 2026-01-03 21:36:43 +08:00
Sayantan Chakraborty 7434dd6a2d Merge pull request #1984 from rust-lang/rustc-pull
Rustc pull update
2026-01-03 03:33:46 +00:00
Eduardo Sánchez Muñoz 68701ff93a arm_shared: avoid using transmute and unsafe fn in tests 2026-01-02 22:07:47 +01:00
Eduardo Sánchez Muñoz dab553268a x86: avoid using transmute in some tests 2026-01-02 22:07:47 +01:00
Eduardo Sánchez Muñoz 69c7a7e405 Use a generic type to implement SIMD types in core_arch::simd
This allows the `types` macro to easily implement `From<Simd<T, N>>` and `Into<Simd<T, N>>`
2026-01-02 22:07:47 +01:00
Sayantan Chakraborty c914627c86 Merge pull request #1988 from eduardosm/packed-struct
Change `repr(packed)` struct to `repr(C, packed)`
2026-01-02 20:31:26 +00:00
Eduardo Sánchez Muñoz f41fa64f97 Change repr(packed) struct to repr(C, packed)
`repr(packed)` structs do not have a well-defined layout
2026-01-02 21:18:51 +01:00
Sayantan Chakraborty 85f3ba3dd1 Merge pull request #1985 from usamoi/vpmaddwd
Use LLVM intrinsics for `madd` intrinsics
2026-01-02 19:35:29 +00:00
usamoi 344fc5112a Use LLVM intrinsics for madd intrinsics 2026-01-02 00:02:11 +08:00
Folkert de Vries da57c6418d Merge pull request #1986 from veluca93/main
Clarify documentation around "undefined" bits in intrinsics.
2026-01-01 13:23:06 +00:00
Luca Versari c571336420 Clarify documentation around "undefined" bits in intrinsics. 2026-01-01 13:24:42 +01:00
The rustc-josh-sync Cronjob Bot 8a8b2e72e0 Merge ref '48622726c4a9' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 48622726c4
Filtered ref: cd67a857259ae6c8e166020f097dd070d6c16fb3
Upstream diff: https://github.com/rust-lang/rust/compare/8401398e1f14a24670ee1a3203713dc2f0f8b3a8...48622726c4a91c87bf6cd4dbe1000c95df59906e

This merge was created using https://github.com/rust-lang/josh-sync.
2026-01-01 04:24:14 +00:00
The rustc-josh-sync Cronjob Bot 6ba984fa33 Prepare for merging from rust-lang/rust
This updates the rust-version file to 48622726c4.
2026-01-01 04:24:07 +00:00
bors 48622726c4 Auto merge of #150289 - rami3l:dist/rustc-docs-dist-path, r=jieyouxu
fix(bootstrap/dist)!: change dist path for `rustc-docs` to avoid clashing

Closes rust-lang/rust#75833, part of https://github.com/rust-lang/rustup/issues/3717:

> I'd like to know if we can assign another folder name to `rustc-docs`?
> [...]
> [`@ThePuzzlemaker](https://github.com/ThePuzzlemaker)'s` `share/doc/rust/html/nightly-rustc` does look a bit weird to me (`nightly-rustc` has nothing to do with the current `rustc`, i.e. the Rustc Book, but they somehow appear similar just looking at the names).
>
> I personally would like to see something like `share/doc/rust/html/rustc-docs` or `share/doc/rust/html/rustc-api` for this component.
_https://github.com/rust-lang/rust/issues/75833#issuecomment-2002503223_

The TLDR is that currently the "rustc book"'s path clashes with "rustc APIs" (i.e. `rustc-docs`), so we change the path of the latter to make it distributable via rustup.

I'm new to `bootstrap` so please feel free to point out any inconsistencies or any extra work I'll need to do to fully land this somewhat breaking change.
2025-12-31 22:00:15 +00:00
Amanieu d'Antras 56a8bfadfc Merge pull request #1981 from eduardosm/unsafe-tests
x86: remove "unsafe" from tests that do not need it
2025-12-31 20:41:19 +00:00
bors 8d670b93d4 Auto merge of #150546 - JonathanBrouwer:rollup-jkqji1j, r=JonathanBrouwer
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146798 (RISC-V: Implement (Zkne or Zknd) intrinsics correctly)
 - rust-lang/rust#150337 (docs: fix typo in std::io::buffered)
 - rust-lang/rust#150530 (Remove `feature(string_deref_patterns)`)
 - rust-lang/rust#150543 (`rust-analyzer` subtree update)
 - rust-lang/rust#150544 (Use --print target-libdir in run-make tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-31 18:42:17 +00:00
Jonathan Brouwer 552918bfcd Rollup merge of #150544 - bjorn3:run_make_print_target_libdir, r=Urgau,jieyouxu
Use --print target-libdir in run-make tests

This makes the tests more robust against sysroot layout changes and slightly simplifies them.
2025-12-31 17:32:07 +01:00
Jonathan Brouwer 8dc15d2424 Rollup merge of #150543 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/76d44ffb3f86b87771b2bb5e808d42992c1ad745.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-31 17:32:06 +01:00
Jonathan Brouwer 15c467ba0c Rollup merge of #150530 - Zalathar:string-deref-patterns, r=jackh726
Remove `feature(string_deref_patterns)`

The older `string_deref_patterns` feature has been superseded by the newer and more general `deref_patterns` feature. Removing string-deref-patterns allows us to get rid of a few tricky special cases in match lowering, which are different from the special cases used by deref-patterns.

The handful of existing tests for `string_deref_patterns` have been migrated to use `deref_patterns` instead. Current nightly users of the older feature should hopefully be able to migrate to the newer feature without too much trouble.

Note that `deref_patterns` is currently marked as an “incomplete” feature, because it doesn't have an accepted RFC. But `string_deref_patterns` doesn't appear to have ever had an accepted RFC either, so arguably it should have been marked incomplete too.

---
- Tracking issue for both features: https://github.com/rust-lang/rust/issues/87121
- Original implementation: https://github.com/rust-lang/rust/pull/98914
- [Zulip thread: Can we remove `#![feature(string_deref_patterns)]`?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Can.20we.20remove.20.60.23!.5Bfeature.28string_deref_patterns.29.5D.60.3F/with/565787352)
2025-12-31 17:32:06 +01:00
Jonathan Brouwer f366fa5121 Rollup merge of #150337 - AsakuraMizu:main, r=jhpratt
docs: fix typo in std::io::buffered
2025-12-31 17:32:05 +01:00
Jonathan Brouwer dc103c4cd9 Rollup merge of #146798 - a4lg:riscv-intrinsics-zkne_or_zknd, r=Amanieu
RISC-V: Implement (Zkne or Zknd) intrinsics correctly

On rust-lang/stdarch#1765, it has been pointed out that two RISC-V (64-bit only) intrinsics to perform AES key scheduling have wrong target feature.
`aes64ks1i` and `aes64ks2` instructions require *either* Zkne (scalar cryptography: AES encryption) or Zknd (scalar cryptography: AES decryption) extension (or both) but corresponding Rust intrinsics (in `core::arch::riscv64`) required *both* Zkne and Zknd extensions.

An excerpt from the original intrinsics:

```rust
#[target_feature(enable = "zkne", enable = "zknd")]
```

To fix that, we need to:

1.  Represent a condition where *either* Zkne or Zknd is available and
2.  Workaround an issue: `llvm.riscv.aes64ks1i` / `llvm.riscv.aes64ks2` LLVM intrinsics require either Zkne or Zknd extension.

This PR attempts to resolve them by:

1.  Adding a perma-unstable RISC-V target feature: `zkne_or_zknd` (implied from both `zkne` and `zknd`) and
2.  Using inline assembly to construct machine code directly (because `zkne_or_zknd` alone cannot imply neither Zkne nor Zknd, we cannot use LLVM intrinsics).

The author confirmed that we can construct an AES key scheduling function with decent performance using fixed `aes64ks1i` and `aes64ks2` intrinsics (with optimization enabled).
2025-12-31 17:32:04 +01:00
bors a2bc948b7f Auto merge of #150542 - JonathanBrouwer:rollup-3fjgrji, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#150193 (Port `#[instruction_set]` to attribute parser)
 - rust-lang/rust#150511 (Allow inline calls to offload intrinsic)
 - rust-lang/rust#150539 (Corretly link URL in internal Windows docs)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-31 15:26:49 +00:00
bjorn3 1a4e7f9aa9 Use --print target-libdir in run-make tests
This makes the tests more robust against sysroot layout changes and
slightly simplifies them.
2025-12-31 15:15:28 +00:00
Jonathan Brouwer a7113d74eb Rollup merge of #150539 - Noratrieb:mark-it-down, r=ChrisDenton
Corretly link URL in internal Windows docs

```
warning: this URL is not a hyperlink
   --> library/std/src/sys/pal/windows/mod.rs:337:5
    |
337 | /// https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: bare URLs are not automatically turned into clickable links
    = note: `#[warn(rustdoc::bare_urls)]` on by default
help: use an automatic link instead
    |
337 | /// <https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail>
    |     +                                                        +
```
2025-12-31 14:30:48 +01:00
Jonathan Brouwer d898dccc21 Rollup merge of #150511 - Sa4dUs:offload-inline, r=ZuseZ4
Allow inline calls to offload intrinsic

Removes explicit insertion point handling and recovers the pointer at the end of the saved basic block.

r? `@ZuseZ4`

fixes: https://github.com/rust-lang/rust/issues/150413
2025-12-31 14:30:48 +01:00
Jonathan Brouwer 5183d8f15d Rollup merge of #150193 - Bryntet:parse_instruction_set, r=JonathanBrouwer
Port `#[instruction_set]` to attribute parser

Please note the test changes, and deprecation of `E0778` and `E0779`

In my opinion, all errors related to this attribute are improved I think, except for if you have `#[instruction_set(arm::)]` in which case there's an `error: expected identifier, found <eof>`, which is quite unhelpful I think, but this seems to be a limitation of the general attribute parsing flow

r? `@JonathanBrouwer`
2025-12-31 14:30:47 +01:00
Noratrieb 4e90a96542 Corretly link URL in internal Windows docs
```
warning: this URL is not a hyperlink
   --> library/std/src/sys/pal/windows/mod.rs:337:5
    |
337 | /// https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: bare URLs are not automatically turned into clickable links
    = note: `#[warn(rustdoc::bare_urls)]` on by default
help: use an automatic link instead
    |
337 | /// <https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail>
    |     +                                                        +
```
2025-12-31 13:54:03 +01:00
Marcelo Domínguez 41a24c4b58 Add offload test for control flow handling 2025-12-31 13:11:28 +01:00
Marcelo Domínguez 9d8b4cc70d Restore builder at the end of saved bb 2025-12-31 13:10:29 +01:00
bors 2848c2ebe9 Auto merge of #147361 - saethlin:fallible-cycle-detection, r=oli-obk
Make inliner cycle detection a fallible process

The query `mir_callgraph_cyclic` is supposed to find _all_ callees that _may_ lead to a recursive call back to the given `LocalDefId`. But that query was built using a function which recurses through the call graph and tries to locally handle hitting the recursion limit during the walk. That is wrong. If the recursion limit is encountered, the set may be incomplete and thus useless. If we hit the recursion limit the only correct thing to do is bail.

Some benchmarks improve because for some functions we will bail out of the call graph walk faster. Some benchmarks regress because we do less inlining, but that is quite rare with the default recursion depth.

Originally I thought this might be a fix for https://github.com/rust-lang/rust/issues/131960, but it turns out that it is _actually_ a fix for https://github.com/rust-lang/rust/issues/146998.
2025-12-31 10:05:42 +00:00
Chayim Refael Friedman 6d0f23cbdc Merge pull request #21375 from A4-Tacks/impl-trait-target-and-dyn-hint
Fix incorrect dyn hint in `impl Trait for`
2025-12-31 08:30:52 +00:00
A4-Tacks c19e9ecdd9 Fix incorrect dyn hint in impl Trait for
Example
---
```rust
trait T {}
impl T for {}
```

**Before this PR**

```rust
trait T {}
impl T for {}
  // ^ dyn
```

**After this PR**

```rust
trait T {}
impl T for {}
```
2025-12-31 16:18:33 +08:00
Lukas Wirth 5bb8d5d1e3 Merge pull request #21370 from ChayimFriedman2/macro-brace-style
feat: Add #[rust_analyzer::macro_style()] attribute to control macro completion brace style
2025-12-31 07:39:54 +00:00
bors 629b092f8f Auto merge of #150525 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

9 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..b54051b1505281ec7a45a250140a0ff25d33f319
2025-12-26 19:39:15 +0000 to 2025-12-30 20:35:52 +0000
- fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448)
- Implement fine grain locking for `build-dir` (rust-lang/cargo#16155)
- feat(resolver): List features when no close match (rust-lang/cargo#16445)
- feat(report): new command `cargo report sessions` (rust-lang/cargo#16428)
- feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407)
- test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444)
- feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415)
- feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441)
- fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439)

r? ghost
2025-12-31 06:49:05 +00:00
Chayim Refael Friedman a5e6198e70 Merge pull request #21374 from Jefffrey/excuse-non-camel-case-repr-c
fix: don't fire `non_camel_case_types` lint for structs/enums marked with `repr(C)`
2025-12-31 06:43:17 +00:00
Jefffrey 935e3cbb86 fix: don't fire non_camel_case_types lint for structs/enums marked with repr(C) 2025-12-31 15:29:51 +09:00
Zalathar ef8d943ecd Remove feature(string_deref_patterns) 2025-12-31 14:21:38 +11:00
Ben Kimock cee7f5ed31 Add a regression test 2025-12-30 22:21:03 -05:00
bors ab32c26b49 Auto merge of #150516 - Ayush1325:uefi-fs-readdir-fix, r=jhpratt
std: sys: fs: uefi: Ignore "." and ".." when reading directory

- At least in Unix, "." and ".." are not returned as a directory entry. So ignore these in UEFI as well.
- Will also allow using the `remove_dir_all` implementation from `sys/fs/common`.
2025-12-31 03:13:08 +00:00
Ben Kimock 74e0a9aa81 Make inliner cycle detection a fallible process 2025-12-30 22:01:49 -05:00
Edvin Bryntesson acd6ba4edb Port #[instruction_set] to attribute parser 2025-12-31 03:01:05 +01:00
bors 94f8f4083e Auto merge of #150526 - JonathanBrouwer:rollup-j9hy7fm, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#150058 (Enable file locking support for Hurd)
 - rust-lang/rust#150420 (Do not spill operand debuginfo to stack for AArch64 SVE predicates `<vscale x N x i1>` where `N != 16`)
 - rust-lang/rust#150501 (Fix Typos in Platform Support Tables)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-30 22:40:16 +00:00
Jonathan Brouwer 342a1acb71 Rollup merge of #150501 - qb42:patch-1, r=workingjubilee
Fix Typos in Platform Support Tables

3 recently demoted targets had their entries moved to the tier 3 table without adjusting for the extra "host" column, this PR adds an empty column so they display correctly.

2 recently promoted targets had the opposite problem, also fixed.

While doing that I noticed that empty columns were represented inconsistently throughout the file so I normalized them all to be 2 spaces, which seemed to be the majority opinion (139 instances vs 5 for 1 space and 19 for 3 spaces).

Closes: rust-lang/rust#150499
2025-12-30 23:27:45 +01:00
Jonathan Brouwer 4b49c9f9d8 Rollup merge of #150420 - h3fang:sve-debuginfo-fix, r=workingjubilee
Do not spill operand debuginfo to stack for AArch64 SVE predicates `<vscale x N x i1>` where `N != 16`

This pull request tries to fix rust-lang/rust#150419.

The debuginfo for AArch64 SVE predicates `<vscale x N x i1>` where `N != 16` should be ignored by this [commit](https://github.com/rust-lang/rust/pull/143924/changes/89eea57594e3e1d8e618dd530ea1c8e7c9b4c7a4).

https://github.com/rust-lang/rust/blob/89eea57594e3e1d8e618dd530ea1c8e7c9b4c7a4/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs#L438-L452

But in line 446, the `marker_type.kind()` is `ty::Bool` instead of `ty::Slice`, so the code doesn't work as intended.

This pull request uses the [`Ty::scalable_vector_element_count_and_type`](https://github.com/rust-lang/rust/blob/main/compiler/rustc_middle/src/ty/sty.rs#L1272) method to fix the condition checks for  `<vscale x N x i1>` where `N != 16` and add a compiletest for this case.
2025-12-30 23:27:44 +01:00
Jonathan Brouwer de16c1aa4c Rollup merge of #150058 - Fabian-Gruenbichler:main, r=workingjubilee
Enable file locking support for Hurd

like Illumos (rust-lang/rust#148322) and aix (rust-lang/rust#148619), Hurd was missed when originally
introducing locking gates per target OS in rust-lang/rust#132977. building rustc on Hurd was
broken as a result since 1.91.
2025-12-30 23:27:44 +01:00
Weihang Lo 62d19109c8 Update cargo submodule 2025-12-30 17:05:59 -05:00
Chayim Refael Friedman df998811ce Adapt macros in rust-analyzer to new attribute
`match_ast!` cannot be ported because of a weird compiler bug: https://github.com/rust-lang/rust/issues/150518.
2025-12-30 22:44:23 +02:00
Chayim Refael Friedman 975aa0dc8a Add #[rust_analyzer::macro_style()] attribute to control macro completion brace style 2025-12-30 22:44:18 +02:00