Commit Graph

331554 Commits

Author SHA1 Message Date
Jonathan Brouwer
c1d608bb7e Rollup merge of #158760 - kpeis695:fix/localkey-try-with-may-return, r=aapoalas
Clarify that `LocalKey::try_with` may return `AccessError`

The docs for `LocalKey::try_with` state that the function *will* return an `AccessError` when the key has been destroyed. That's not actually guaranteed:

- `LocalKey::with` uses `try_with` internally and its docs explicitly acknowledge that it does not always panic when the destructor has run. If `try_with` really did detect every destroyed thread-local, `with` could always panic.
- The top-level `LocalKey` docs already note: "On all platforms it's possible for TLS to re-initialize other TLS slots during destruction."

Change *will* to *may* to accurately reflect the best-effort nature of the destroyed-key check.

Closes rust-lang/rust#157889

@rustbot label +A-docs
2026-07-07 22:26:56 +02:00
Jonathan Brouwer
7fd85325c0 Rollup merge of #158697 - ferrocene:qnx-sdp-8-fixes, r=aapoalas
Fixes for QNX SDP 8

This PR contains libstd fixes so libstd can be build for QNX SDP 8.

It requires patches to libc-0.2 and cc-rs. The cc-rs patch [was merged]([rust-lang/cc-rs#1775](https://github.com/rust-lang/cc-rs/issues/1775)) already. I have a patch for libc-1.0 [here](https://github.com/rust-lang/libc/issues/5241) which will need backporting to libc-0.2 once merged.

With these in place, I was able to remotely `test tests/ui library/std library/alloc library/core` for `x86_64-pc-qnx` using a remote-test-server running on QNX SDP 8.0's QEMU BSP image. The only tests that failed were the two `tests/ui/codegen/huge-stacks.rs` tests, and I did not have enough RAM to run them.
2026-07-07 22:26:55 +02:00
Jonathan Brouwer
2ff42bf6d7 Rollup merge of #158696 - camsteffen:body-id, r=oli-obk
Rename some `body_id` to `body_def_id`

Since body IDs and item IDs are distinct things, try to use names that do not conflate them. `body_def_id` is a little easier to read as "body-owning definition ID" whereas `body_id` is hard not to just read as "body ID".

Related: rust-lang/rust#158611 - I noticed this afterwards. I suspect that `FnCtxt` ought to keep `body_def_id` but maybe add `body_id: BodyId` in addition.
2026-07-07 22:26:54 +02:00
Jonathan Brouwer
9e8d31b630 Rollup merge of #158690 - aerooneqq:delegation-self-type-arguments-wrapping, r=petrochenkov
delegation: support mapping of all arguments with `Self` type

This PR supports applying target expression to arguments of `Self` type.
That the first part of this feature which touches AST -> HIR lowering only and allows lowering of delegation's block several times when there are no definitions inside.
The second part will adjust typeck so we can apply adjustments to all mapped arguments as to the first argument of delegation. This should also eventually weak the condition of argument mapping allowing `Box<Self>`, `Arc<Self>`, etc.

Part of rust-lang/rust#118212.
r? @petrochenkov
2026-07-07 22:26:53 +02:00
Jonathan Brouwer
15d0ce972e Rollup merge of #158621 - folkertdev:abi-custom-wasm, r=bjorn3
disallow `extern "custom"` on wasm and spirv targets

tracking issue: https://github.com/rust-lang/rust/issues/140829

I'm not sure if we should exclude any other architectures? The GPU ones are a bit suspect maybe?
2026-07-07 22:26:52 +02:00
Jonathan Brouwer
d4f301147a Rollup merge of #158179 - joboet:arm_macos_preadv, r=Darksonn
std: unconditionally use `preadv`/`pwritev` on AArch64 macOS

The stars happened to line up perfectly: macOS 11.0 was the first version to support ARM, and also the first version with `preadv`/`pwritev`. Thus we don't need to use weak linkage if the target is `aarch64-apple-darwin`.
2026-07-07 22:26:51 +02:00
Jonathan Brouwer
d82ce7d2a7 Rollup merge of #157385 - sgasho:x86-mac-enzyme, r=ZuseZ4
Enable Enzyme on x86_64-apple

Enable Enzyme for x86_64-apple

similar PR: https://github.com/rust-lang/rust/pull/157240

r? @ZuseZ4
2026-07-07 22:26:50 +02:00
Jonathan Brouwer
73cd65d1b0 Rollup merge of #156016 - scrabsha:view-types/in-ast, r=oli-obk
view-types: store view types in the AST
2026-07-07 22:26:49 +02:00
Jorge Aparicio
49769afe4b QNX SDP 8 fixes.
1) setsid/setpgrp: check child's group process ID

Linux [1], FreeBSD [2] and the Open Group [3] manuals for both setsid and
setpgrp state that the calling process will be assigned a process group ID that
matches its process ID so check that's the case in the test by calling
getpgid on the child process ID.

on QNX8 (as of GA8.0.2) libc::kill(pgid) appears unable to terminate the
child process so skip that check on that target as it's behavior that
libstd provides no API for

[1]: https://man7.org/linux/man-pages/man2/setsid.2.html
[2]: https://man.freebsd.org/cgi/man.cgi?query=setsid&sektion=2
[3]: https://pubs.opengroup.org/onlinepubs/000095399/functions/setsid.html

2) fix handling of sockaddr_un.len on QNX

also extend the existing tests to exercise the getsockname(2) and
getpeername(2) paths with both named and unnamed Unix sockets

3) Additional fixes library/std after earlier PR renamed some targets

4) Replace more instances of "QNX Neutrino / QNX OS" with "QNX SDP" and fix up some documentation URLs

5) Tests ignored on target_os = "nto" should also be ignored on target_os = "qnx".

6) Simplify nto-qnx.md documentation

cc-rs now knows about QNX so the environment isn't required
2026-07-07 17:31:05 +01:00
joboet
4674b5d223 std: unconditionally use preadv/pwritev on AArch64 macOS 2026-07-07 15:06:51 +02:00
Folkert de Vries
5d925d753c disallow extern "custom" on spirv 2026-07-07 14:54:34 +02:00
Folkert de Vries
b10bdc4db4 add extern "custom" test to the naked functions tests 2026-07-07 14:47:56 +02:00
Folkert de Vries
3decf25956 disallow extern "custom" on wasm 2026-07-07 14:47:56 +02:00
Folkert de Vries
4b909171f5 add wasm targets to unsupported abi test 2026-07-07 14:47:55 +02:00
aerooneqq
831a2e85ab delegation: support mapping of all arguments with Self type
* Support mapping of all arguments with Self type
* Address some review comments
* Review: use #[cfg(debug_assertions)] on the whole module
* Review: emit error when trying to map non-receiver argument when block contains definitions
* Use `cfg_select`
* Fix tidy
* Unify mapping with `should_generate_block`
* Better naming and message for error
* loop -> `extend`
2026-07-07 11:01:21 +00:00
bors
f10db292a3 Auto merge of #158896 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to 7ae18ed96a.

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

r? @ghost
2026-07-07 08:25:59 +00:00
Sasha Pourcelot
3ed5f56b7d pattern-types: fix formatting in rustfmt 2026-07-07 10:21:22 +02:00
bors
bcd9ae8b77 Auto merge of #158891 - jhpratt:rollup-ziqyJdz, r=jhpratt
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#158478 (Use correct typing mode in mir building for the next solver)
 - rust-lang/rust#158796 (Distinguish null reference production from null pointer dereference in UB checks)
 - rust-lang/rust#158821 (add regression test for late-bound type method probe ICE)
 - rust-lang/rust#158245 (Update the rustc_perf submodule)
 - rust-lang/rust#158346 (Prevent rustdoc auto-trait ICEs with `-Znext-solver=globally`)
 - rust-lang/rust#158536 (Instatiate binder instead of skipping when suggesting function arg error)
 - rust-lang/rust#158553 (Avoid infinite recursion when trying to build valtrees for self-referential consts)
 - rust-lang/rust#158679 (Document blocking guarantees for `std::sync`)
 - rust-lang/rust#158826 (Reorganize `tests/ui/issues` [19/N])
 - rust-lang/rust#158860 (Delete `impl_def_id` field from `ImplHeader`)
 - rust-lang/rust#158867 (rewrite `Align::max_for_target` in a more obvious way)
 - rust-lang/rust#158878 (borrowck: Inline `free_region_constraint_info()` to simplify the code)
 - rust-lang/rust#158881 (Update mdbook to 0.5.4)
2026-07-07 04:38:49 +00:00
Jacob Pratt
6673d7de61 Rollup merge of #158881 - ehuss:update-mdbook, r=Mark-Simulacrum
Update mdbook to 0.5.4

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-054
2026-07-06 22:17:49 -04:00
Jacob Pratt
86de60d933 Rollup merge of #158878 - Enselic:inline-free_region_constraint_info, r=jieyouxu
borrowck: Inline `free_region_constraint_info()` to simplify the code

For reference, the helper function was introduced in 2a3969a3f7. But, the code becomes simpler if we remove the helper function, so let's remove it.

This takes us one step closer (this is commit 3 of 4) towards the end result illustrated in https://github.com/rust-lang/rust/pull/158623.
2026-07-06 22:17:48 -04:00
Jacob Pratt
e546c541f5 Rollup merge of #158867 - WaffleLapkin:driveby, r=scottmcm
rewrite `Align::max_for_target` in a more obvious way

r? scottmcm

The old version was just as correct, and arguably this doesn't matter, but oh well...

Following the confusion in https://github.com/rust-lang/rust/pull/152929/changes#r2836568710.
2026-07-06 22:17:47 -04:00
Jacob Pratt
d15fee0dd0 Rollup merge of #158860 - theemathas:del-impl-header-field, r=nnethercote
Delete `impl_def_id` field from `ImplHeader`

This field is not used anywhere.
2026-07-06 22:17:46 -04:00
Jacob Pratt
41eeb9b29f Rollup merge of #158826 - zedddie:gsoc-batch-19-meow, r=Teapot4195
Reorganize `tests/ui/issues` [19/N]

Part of [GSoC'26 project](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Reorganizing.20tests.2Fui.2Fissues)

r? Kivooeo
@Teapot4195
2026-07-06 22:17:46 -04:00
Jacob Pratt
f2b7994a66 Rollup merge of #158679 - cyexclam:sync-document-blocking-guarantees, r=clarfonthey
Document blocking guarantees for `std::sync`

Per rust-lang/rust#157728, this PR documents how exactly functions/methods in `std::mpsc` (and `mpmc`) block.

Copied from the issue:
> For the wasm part of this specifically, yes, using a mutex anywhere is basically forbidden on the main thread in browsers. Personally I don't think it's reasonable to expect the standard library to use zero mutexes on wasm and make absolutely everything lock-free. This is a consequence of browsers and not something Rust can "just" fix. Basically I would not recommend changing the implementation and instead leaving it as-is. I'll note that there's a long and storied history of blocking-the-main-thread-with-wasm-threads in the browser, and I'm not putting in all the context here.
>
> \- alexcrichton

(P.S. documentation seems to be line wrapped but doesn't have a consistent wrapping width? I tried to match the surrounding style as best as I could; let me know if there's something better I should've done)

Fixes rust-lang/rust#157728
2026-07-06 22:17:45 -04:00
Jacob Pratt
ce811cd701 Rollup merge of #158553 - sjwang05:issue-144719, r=oli-obk
Avoid infinite recursion when trying to build valtrees for self-referential consts

This PR adds cycle detection to `const_to_valtree_inner` by using a tricolor DFS, so self-referential statics in pats don't cause valtree construction to recurse infinitely. Instead, we now return a new `ValTreeCreationError::CyclicConst`, similar to the current `InvalidConst` and `NodesOverflow` variants.

fixes rust-lang/rust#144719
2026-07-06 22:17:44 -04:00
Jacob Pratt
2653bfb6f1 Rollup merge of #158536 - ShoyuVanilla:issue-158317, r=lcnr
Instatiate binder instead of skipping when suggesting function arg error

Fixes https://github.com/rust-lang/rust/issues/158317

r? lcnr
2026-07-06 22:17:44 -04:00
Jacob Pratt
1c4fe1a844 Rollup merge of #158346 - Jamesbarford:fix/auto-trait-impl, r=lcnr
Prevent rustdoc auto-trait ICEs with `-Znext-solver=globally`

- Ensure rustdoc with `-Znext-solver=globally` does not ICE.

r? @lcnr
2026-07-06 22:17:43 -04:00
Jacob Pratt
96b5fba79e Rollup merge of #158245 - jdonszelmann:update-rustc-perf, r=Kobzol
Update the rustc_perf submodule

I hope this is a thing that's ok to do, I never update submodules but this one seems to be 8 months old and we got some new benchmarks in the meantime.

r? @Kobzol
2026-07-06 22:17:42 -04:00
Jacob Pratt
57c4b97ad9 Rollup merge of #158821 - amirHdev:add-test-non-lifetime-binders-ice, r=chenyukang
add regression test for late-bound type method probe ICE

Closes rust-lang/rust#149014
2026-07-06 22:17:41 -04:00
Jacob Pratt
91fc16bab6 Rollup merge of #158796 - raushan728:issues/154044, r=saethlin
Distinguish null reference production from null pointer dereference in UB checks

Closes rust-lang/rust#154044

This change distinguishes null reference production from actual null pointer dereferences in the UB checks.

Producing a reference from a null pointer (for example, `&*ptr`) is undefined behavior even if no memory is dereferenced. This change introduces a dedicated `AssertKind::NullReferenceConstructed` and runtime panic so these cases produce a more accurate diagnostic while preserving the existing panic for actual null pointer dereferences.

Summary
- Add `AssertKind::NullReferenceConstructed`.
- Emit it for null reference production in the MIR null check pass.
- Add `panic_null_reference_constructed` and its lang item.
- Keep `NullPointerDereference` for actual dereferences.
- Update the affected UI tests.
2026-07-06 22:17:40 -04:00
Jacob Pratt
61ff1d7289 Rollup merge of #158478 - adwinwhite:rigid-alias-ice, r=lcnr
Use correct typing mode in mir building for the next solver

Previously, we used typing env `non_body_analysis`  when building MIR body.
This is wrong because we're in a body and should reveal opaque types defined in this scope.

Fixes rust-lang/rust#158439
Fixes rust-lang/rust#158429

r? lcnr or anyone familiar with typing modes.
2026-07-06 22:17:40 -04:00
bors
b960fcf2ff Auto merge of #158577 - bal-e:macro-parsing-polish, r=nnethercote
Polish some macro parsing code



I'm working on some optimizations to `macro_parser.rs` and the surrounding code (specifically, changing the current BFS approach into a DFS), and these changes fell out during that effort. I think they make the code more accessible in addition to laying some foundations for my future work (in particular, the handling of ambiguities).

This is my first proper entrance into rustc code, please let me know if I'm holding something wrong :)

The commits are organized and individually reviewable.

r? @nnethercote
2026-07-06 22:08:27 +00:00
Cameron Steffen
f13657cad6 Rename some body_id vars to body_def_id
`body_id` is often used to mean "ID of a body-owning node", which is
confusing since the obvious reading of "body ID" is wrong.

`body_def_id` is easier to read as "body-owning definition ID".
2026-07-06 17:03:14 -05:00
Eric Huss
1b75a0a63c Update mdbook to 0.5.4
Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-054
2026-07-06 12:54:50 -07:00
bors
c4af71034e Auto merge of #158847 - jhpratt:rollup-MkjhKjV, r=jhpratt
Rollup of 24 pull requests

Successful merges:

 - rust-lang/rust#158377 (add `-Zforce-intrinsic-fallback` flag)
 - rust-lang/rust#158642 (Clarify some interning details)
 - rust-lang/rust#158694 (Positive test for closures needing expectations)
 - rust-lang/rust#158743 (Look for cdb location in the registry first)
 - rust-lang/rust#158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - rust-lang/rust#158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - rust-lang/rust#158785 (hook intrinsic-test into aarch64-gnu)
 - rust-lang/rust#158819 (Put `InhabitedPredicate::NotInModule` earlier in disjunction since it can be a lot faster)
 - rust-lang/rust#157734 (Stabilize `local_key_cell_update`)
 - rust-lang/rust#158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - rust-lang/rust#158310 (Remove unexpected usage of Unambig in non-infer variants)
 - rust-lang/rust#158671 (Move tests batch 17)
 - rust-lang/rust#158730 (Update `FIXME(static_mut_refs)` comments)
 - rust-lang/rust#158752 (Reorganize `tests/ui/issues` [18/N])
 - rust-lang/rust#158755 (Use `ThinVec` more in the AST)
 - rust-lang/rust#158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - rust-lang/rust#158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - rust-lang/rust#158771 (library: expand HashSet::extract_if coverage)
 - rust-lang/rust#158772 (rustc-dev-guide subtree update)
 - rust-lang/rust#158776 (fix: emit diagnostic for AVR target without target-cpu)
 - rust-lang/rust#158786 (Add regression test for builtin attr macro values)
 - rust-lang/rust#158810 (Add supplementary information for get_unchecked(mut))
 - rust-lang/rust#158825 (Fix typo)
 - rust-lang/rust#158838 (tidy: Use `empty_alternate = true` for triagebot mention glob check)
2026-07-06 18:54:19 +00:00
Cypher
81a18e7a94 document blocking guarantees for std::sync 2026-07-06 13:35:50 -04:00
Martin Nordholts
690ae7deeb borrowck: Inline free_region_constraint_info() to simplify the code
For reference, the helper function was introduced in 2a3969a3f7. In
any case, the code becomes simpler if we remove it now, so let's remove
it.
2026-07-06 19:14:08 +02:00
bors
36714a9983 Auto merge of #158864 - JonathanBrouwer:rollup-re2xAGf, r=JonathanBrouwer
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#156976 (enable eager `param_env` norm in new solver)
 - rust-lang/rust#158537 (Add `std::io::cursor::WriteThroughCursor`)
 - rust-lang/rust#158540 (Move `std::io::Seek` to `core::io`)
 - rust-lang/rust#157820 (consider subtyping when checking if an infer var is sized)
 - rust-lang/rust#158505 (Update POSIX edition links)
 - rust-lang/rust#158853 (Fix typo for link on nto-qnx.md)
 - rust-lang/rust#157466 (Better error message when bare type in impl parameter list)
 - rust-lang/rust#157966 (Emit a suggestion to cast the never type into a concrete type when it fails to satisfy an `impl Trait` bound)
 - rust-lang/rust#158381 (Expose debug scope of statement and terminator in rustc_public)
 - rust-lang/rust#158405 (rustc_target: Add ARMv8-M related target features)
 - rust-lang/rust#158770 (Weaken guarantee for `From<legacy::RangeInclusive> for RangeInclusive`)
 - rust-lang/rust#158820 (Fix rustdoc ICE on deprecated note in inlined re-export chain)
2026-07-06 15:35:34 +00:00
Waffle Lapkin
35cbff9a4c rewrite Align::max_for_target in a more obvious way 2026-07-06 17:19:21 +02:00
James Barford-Evans
84aa27d895 Tests for find_auto_trait_generics_next_solver path 2026-07-06 16:11:03 +01:00
James Barford-Evans
2740e11e40 Create simple non ICE-ing path for new trait solver 2026-07-06 16:09:25 +01:00
Jonathan Brouwer
68dfc1d61f Rollup merge of #158820 - TaKO8Ki:fix-deprecated-note-reexport-chain, r=GuillaumeGomez
Fix rustdoc ICE on deprecated note in inlined re-export chain

Fixes rust-lang/rust#158745
2026-07-06 17:09:16 +02:00
Jonathan Brouwer
3ffc2ad7be Rollup merge of #158770 - theemathas:range-inclusive-from, r=JohnTitor
Weaken guarantee for `From<legacy::RangeInclusive> for RangeInclusive`

As per https://github.com/rust-lang/rust/pull/155114#issuecomment-4845403701, this `From` impl no longer guarantees panicking for exhausted iterators. Instead, it only guarantees that the conversion will either panic or produce an empty range.

This is done so that we can optimize the implementation of `legacy::RangeInclusive` in a way such that we cannot check if it has been exhausted in a generic context without a `Step` and/or `PartialOrd` bound.

If this PR and/or rust-lang/rust#155114 merges after the 1.98.0 beta branch promotion from the main branch, then this will need a beta backport, since this PR changes the stable guarantee previously made in rust-lang/rust#155421.

This PR conflicts with and/or blocks rust-lang/rust#155114.
2026-07-06 17:09:15 +02:00
Jonathan Brouwer
a6356ed835 Rollup merge of #158405 - taiki-e:armv8m-target-feature, r=davidtwco
rustc_target: Add ARMv8-M related target features

This adds the following unstable target features to `feature(arm_target_feature)` (tracking issue: https://github.com/rust-lang/rust/issues/150246):

- `acquire-release`: Armv8 atomic instructions
- `v6m`: Armv6-M instructions (implies `v6`)
- `v8m`: Armv8-M baseline instructions (implies `v6m`)
- `v8m.main`: Armv8-M mainline instructions (implies `v7`)
- `v8.1m.main`: Armv8.1-M mainline instructions (implies `v8m.main`)
- `mve`: M-Profile Vector Extension (Helium) for integer ops (implies `v8.1m.main`, `dsp`, and `fpregs`)
- `mve.fp`: MVE for integer & float ops (implies `mve`)

The target feature names match with [definitions in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-22.1.8/llvm/lib/Target/ARM/ARMFeatures.td#L597-L741). The dependencies should also match those in LLVM, unless there is no corresponding feature in Rust.

This also adds `mve` to vector ABI check and resolve this comment.
973ad0d0ab/compiler/rustc_target/src/target_features.rs (L1076-L1078)

One of the motivations for adding this: In LLVM, the `v8` target feature is not enabled for ARMv8-M targets, and `v8m`/`v8m.main` is enabled instead, so currently there is no way to detect ARMv8-M from target features.

```console
$ rustc +nightly --print cfg --target thumbv8m.main-none-eabihf | grep target_feature
target_feature="fpregs"
target_feature="mclass"
target_feature="thumb-mode"
target_feature="thumb2"
target_feature="v5te"
target_feature="v6"
target_feature="v6k"
target_feature="v6t2"
target_feature="v7"
```

r? @davidtwco
cc @jonathanpallant

@rustbot label +O-arm +A-target-feature
2026-07-06 17:09:14 +02:00
Jonathan Brouwer
2ff23c3803 Rollup merge of #158381 - hkalbasi:main, r=makai410
Expose debug scope of statement and terminator in rustc_public

Currently, `scope` is exposed for variables, but it is a meaningless number since the boundary of each scope is not available. This PR changes `span` fields of statement and terminator to `source_info` which includes scope as well.

Disclaimer: Written by LLM
2026-07-06 17:09:13 +02:00
Jonathan Brouwer
1c30ae0e19 Rollup merge of #157966 - Muhtasim-Rasheed:issue-157923-suggestion-cast-never-type, r=davidtwco
Emit a suggestion to cast the never type into a concrete type when it fails to satisfy an `impl Trait` bound

Fixes rust-lang/rust#157923
2026-07-06 17:09:13 +02:00
Jonathan Brouwer
baf02d271c Rollup merge of #157466 - bb1yd:issue-147889, r=davidtwco
Better error message when bare type in impl parameter list

Fixes rust-lang/rust#147889

Marking this PR ready for feedback on this problem.

The approach I'm trying is to create a snapshot parser and attempt to re-parse the input in another way. If it succeeds, we successfully predicted the user's intention and emit the related help message. If it fails, we cancel the errors produced during the attempt and report the original error.

The problem is that parse functions may internally recover from parse failures and emit errors directly, which means we can't cancel them later. I saw that we have a `recovery` field to control the recovery mechanism, but it seems there are (maybe) a lot of places in the parser that don't check the recovery field before doing their recovery logic.

Should we always use `look_ahead` instead of using a snapshot parser and calling another parse function?
2026-07-06 17:09:11 +02:00
Jonathan Brouwer
9f49140d68 Rollup merge of #158853 - ferrocene:fix-nto-qnx-typo, r=chenyukang
Fix typo for link on nto-qnx.md

Just a quick fix for a typo in nto-qnx.md that stopped the link from working.
2026-07-06 17:09:11 +02:00
Jonathan Brouwer
bd2ee38a84 Rollup merge of #158505 - schneems:schneems/bump-posix-edition, r=Darksonn
Update POSIX edition links

Comments that reference https://pubs.opengroup.org point to issue 7 (the 2018 edition of IEEE Std 1003.1-2017), with one link still on the older issue 6. The latest issue is 8 (the 2024 edition, IEEE Std 1003.1-2024). From https://www.opengroup.org/austin/papers/posix_faq.html:

> Q3. What is the latest version of POSIX.1?
>
> The 1003.1-2024 standard was published in June 2024. The standard is
> formally known as: IEEE Std 1003.1-2024 The Open Group Technical
> Standard Base Specifications, Issue 8

Issue 8 lives at https://pubs.opengroup.org/onlinepubs/9799919799/.

This PR points all older-edition links to issue 8.

Most links are a straight edition bump, but links with a section anchor needed their anchor rechecked, because section numbering shifts between editions. Verified against the 2024 edition:

- Pathname Resolution moved from 4.13 (`tag_04_13`) to 4.16 (`tag_04_16`)
- Field Splitting moved from `tag_18_06_05` to `tag_19_06_05`
- LC_CTYPE (`tag_07_03_01`) was unchanged

The Miri changes (`src/tools/miri/`) are kept in a separate commit since that's a synced subtree. I'm happy to move them to a `rust-lang/miri` PR if preferred.
2026-07-06 17:09:10 +02:00
Jonathan Brouwer
1d5fe4cf9e Rollup merge of #157820 - WaffleLapkin:sized-infer-sub, r=lcnr
consider subtyping when checking if an infer var is sized

That is, when checking if an inference variable (say `?0`) is sized, with this PR, we now check for obligations like `?1: Sized`, where `?0` and `?1` are transitively related via subtyping (previously we were checking for `?0 = ?1`). This is sound because subtyping cannot change sized-ness.

This fixes the 4-th point/issue from https://github.com/rust-lang/rust/issues/155924. Specifically, it makes this code compile:

```rust
fn blah(e: !) {
    let source = Box::new(e);
    let _: Box<dyn Send> = source;
}
```

This also fixes `tests/ui/impl-trait/unsized_coercion.rs` on new solver, see https://github.com/rust-lang/rust/pull/157820#discussion_r3420501603.

r? types
2026-07-06 17:09:09 +02:00