Implement round-ties-to-even for Duration Debug for consistency with f64
## Summary
This PR proposes a fix for rust-lang/rust#103747 implementing IEEE-754 S4.3 roundTiesToEven for Duration Debug implementation.
## Testing
Added new test in `time.rs` for validating roundTiesToEven behavior in Duration formatting. Reran all debug formatting tests in `time.rs` with `./x test library/coretests --test-args time::debug_formatting`.
Rollup of 3 pull requests
Successful merges:
- rust-lang/rust#148533 (Split LLVM intrinsic abi handling from the rest of the abi handling)
- rust-lang/rust#150358 (fix rustfmt on `const impl Ty {}`)
- rust-lang/rust#150434 (Add test for never type fallback in try blocks with `Into<!>`)
r? `@ghost`
`@rustbot` modify labels: rollup
Add test for never type fallback in try blocks with `Into<!>`
### Summary
Adds UI tests for issue rust-lang/rust#125364, which involves the interaction between
never type fallback, try blocks, and `From`/`Into` trait bounds.
### Changes
- Added `tests/ui/never_type/try-block-never-type-fallback.rs`
- Tests both edition 2021 (where the issue manifests) and edition 2024 (where it's fixed)
### Issue
Closesrust-lang/rust#125364
### Testing
```bash
./x test tests/ui/never_type/try-block-never-type-fallback.rs
```
Both test variants pass:
e2021: Correctly fails with expected error
e2024: Compiles successfully (check-pass)
### Notes
This test documents the edition-dependent behavior of never type fallback in try blocks, as requested in the original issue.
cc `@WaffleLapkin`
Split LLVM intrinsic abi handling from the rest of the abi handling
LLVM intrinsics have weird requirements like requiring the fake "unadjusted" abi, not being callable through function pointers and for all codegen backends other than cg_llvm requiring special cases to redirect them to the correct backend specific intrinsic (or directly codegen their implementation inline without any intrinsic call). By splitting the LLVM intrinsic handling it becomes easier for backends to special case them and should in the future allow getting rid of the abi calculation for `extern "unadjusted"` in favor of computing the correct abi directly in the backend without depending on the exact way cg_ssa lowers types.
Update cargo submodule
17 commits in e91b2baa632c0c7e84216c91ecfe107c37d887c1..94c368ad2b9db0f0da5bdd8421cea13786ce4412
2025-12-13 16:29:21 +0000 to 2025-12-26 19:39:15 +0000
- fix(vendor): unpack from local-registry cache path (rust-lang/cargo#16435)
- feat(index): Stabilize pubtime (rust-lang/cargo#16372)
- Experiment: Render timing pipeline in SVG (rust-lang/cargo#15091)
- chore(triagebot): auto-label `Command-report` (rust-lang/cargo#16429)
- fix(sbom): Don't set CARGO_SBOM_PATH when empty (like stable) (rust-lang/cargo#16419)
- chore(ci): report-timings to upload HTML report (rust-lang/cargo#16416)
- fix(report): get the same feature parity of `--timings` (rust-lang/cargo#16414)
- fix(docs): Document the only possible values for DEBUG in build scripts (rust-lang/cargo#16413)
- fix(log): emit fingeprint log also for no-rebuild unit (rust-lang/cargo#16408)
- Fix link to `doc_cfg` docs in cargo book (rust-lang/cargo#16404)
- Add best pratice for how to check in generated files (rust-lang/cargo#16405)
- test: Use a larger default term width (rust-lang/cargo#16403)
- Document more services and permissions of the cargo team (rust-lang/cargo#16402)
- fix(new): Improve quality of package name error messages (rust-lang/cargo#16398)
- feat(log): add more log events (rust-lang/cargo#16390)
- chore: bump to 0.95.0; update changelog (rust-lang/cargo#16395)
- Cache submodule into git db (rust-lang/cargo#16246)
r? ghost
As this is the only unwinding intrinsic we use and
codegen_llvm_intrinsic_call currently doesn't handle unwinding
intrinsics, this uses the conventional call path for llvm.wasm.throw.
Intrinsics only need a fraction of the functionality offered by
BuilderMethods::call and in particular don't need the FnAbi to be
computed other than (currently) as step towards computing the function
value type.
Improve missing core error for tier 3 targets
Tier 3 targets can't be installed via rustup, so don't recommend that. Additionally, do recommend build-std on stable because it's the recommended way to use these targets, people should switch to nightly.
Document default SOCK_CLOEXEC flag on new UnixStream
Currently, the `std::os::unix::net::UnixStream` docs do not specify that the SOCK_CLOEXEC flag is set on new sockets. This commit adds a note clarifying that, in line with the note abuot the `MSG_NOSIGNAL` flag.
rustdoc: fix duplicate Re-exports sections
Fixesrust-lang/rust#150211
When a module contains both `pub extern crate` and `pub use` items, they were being rendered under two separate "Re-exports" section headers instead of one.
This fix tracks the current section and only renders a new header when the section actually changes, consolidating items that belong to the same section under a single header.
Closes#125364
This test verifies that the never type fallback behavior
in try blocks with `Into<!>` bounds works correctly across
different editions:
- Edition 2021: Fallback to `()` causes type error
- Edition 2024: Fallback to `!` compiles successfully
Don't use `matches!` when `==` suffices
In the codebase we sometimes use `matches!` for values that can actually just be compared. Replace them with `==`.
Subset of rust-lang/rust#149933.
Document relative and absolute paths handling in `--remap-path-prefix`
After what we have been through with https://github.com/rust-lang/rust/pull/150110 and https://github.com/rust-lang/rust/pull/150283 in the compiler, I think it would be good to document the user-facing parts of the relative and absolute paths handling in `--remap-path-prefix`.
r? `@jieyouxu`
Tier 3 targets can't be installed via rustup, so don't recommend that.
Additionally, do recommend build-std on stable because it's the
recommended way to use these targets, people should switch to nightly.
Add `MaybeDangling` to `core`
This is the library part of adding `MaybeDangling`. Note that it doesn't actually do anything described in its docs (yet), I'll make a separate PR for that.
Tracking issue: https://github.com/rust-lang/rust/issues/118166.
r? libs
cc `@RalfJung`
JumpThreading: compute place and value indices on-demand
Profiling JumpThreading reveals that a large part of the runtime happens constructing the place and value `Map`. This is unfortunate, as jump-threading may end up not even doing anything.
The cause for this large up-front cost is following: `Map` attempts to create a `PlaceIndex` for each place that *may* hold a relevant value. This means all places that appear in MIR, but also all places whose value is accessed by a projection of a copy of a larger place.
This PR refactors the creation of `Map` to happen on-demand: place and value indices are created when threading computation happens.
The up-front mode is still relevant for DataflowConstProp, so is not touched.
Fix copy code example with line numbers
Fixesrust-lang/rust#150339.
Since the line numbers are now included in the actual highlighted code, we need to filter them out when we "copy" the code.
r? `@yotamofek`
Currently, the `std::os::unix::net::UnixStream` docs do not specify that
the SOCK_CLOEXEC flag is set on new sockets. This commit adds a note
clarifying that, in line with the note abuot the `MSG_NOSIGNAL` flag.
- fixup `BTreeMap` gdb provider
- fixup `ManuallyDrop` natvis thingy
Now that `MaybeUninit` contains `ManuallyDrop` which contains
`MaybeDangling` (tbc this is the addition), we need to unwrap one more
layer.
Port `#[rustc_must_implement_one_of]` to attribute parser
Stumbled upon a weird (bug ?) behaviour while making this PR
it seems like it is possible to reach `check_attr.rs` checks without the attribute allowed target checks having already been finished, I added a comment about how to reproduce this in `check_attr.rs`
otherwise good to note is that a bunch of code was moved from `compiler/rustc_hir_analysis/src/collect.rs` to `check_attr.rs`
r? `@JonathanBrouwer`
compiler/middle/lint: Suggest `#[expect(dead_code)]` instead of `#[allow(dead_code)]`
Until now the compiler suggested
> help: to override `-W unused` add `#[allow(dead_code)]`
when encountering e.g. an unused function in the codebase.
This PR changes the suggestion to `#[expect(dead_code)]`, which will warn again once the code is being used somewhere. This is helpful because it lets the developer know that the attribute can now be removed again. Without this the codebase will eventually be littered with stray `#[allow(dead_code)]` attributes that are no longer serving any purpose.
This was suggested in https://bsky.app/profile/steveklabnik.com/post/3m2uh7pf6e225 and I agreed strongly enough to take a look and implement it 😆
stdarch subtree update
Subtree update of `stdarch` to 61119062fb.
Created using https://github.com/rust-lang/josh-sync.
r? `@sayantn`
My first josh sync, it lgtm, but let me know if I missed something.
I'm especially looking forward to the amd GPU module, which we want to use for the offload project.