remove multiple unhelpful `reason = "..."` values from `#[unstable(...)]` invocations
The vast majority of `#[unstable()]` attributes already has no explicit reason specified. This PR removes the `reason = "..."` value for the following unhelpful or meaningless reasons:
* "recently added"
* "new API"
* "recently redesigned"
* "unstable"
An example of how the message looks with and without a reason:
```rust
fn main() {
Vec::<()>::into_parts;
Vec::<()>::const_make_global;
}
```
```
error[E0658]: use of unstable library feature `box_vec_non_null`: new API
--> src/main.rs:2:5
|
2 | Vec::<()>::into_parts;
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #130364 <https://github.com/rust-lang/rust/issues/130364> for more information
= help: add `#![feature(box_vec_non_null)]` to the crate attributes to enable
= note: this compiler was built on 2026-01-15; consider upgrading it if it is out of date
error[E0658]: use of unstable library feature `const_heap`
--> src/main.rs:3:5
|
3 | Vec::<()>::const_make_global;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #79597 <https://github.com/rust-lang/rust/issues/79597> for more information
= help: add `#![feature(const_heap)]` to the crate attributes to enable
= note: this compiler was built on 2026-01-15; consider upgrading it if it is out of date
```
Most of the remaining reasons after this are something similar to "this is an implementation detail for XYZ" or "this is not public". If this PR is approved, I'll look into those next.
The PR also removes the `fd_read` feature gate. It only consists of one attribute applied to an implementation inside a module that is already private and unstable and should not be needed.
Rollup of 5 pull requests
Successful merges:
- rust-lang/rust#151092 (Generate macro expansion for rust compiler crates docs)
- rust-lang/rust#151120 (Fix deprecated attribute intra-doc link not resolved in the right location on reexported item)
- rust-lang/rust#151207 (Preliminary match/capture test cleanup for PR 150681)
- rust-lang/rust#151221 (Reorganizing `tests/ui/issues` 5 tests [1/N])
- rust-lang/rust#151222 (feat: Support references in reflection type info)
r? @ghost
Fix deprecated attribute intra-doc link not resolved in the right location on reexported item
Fixes https://github.com/rust-lang/rust/issues/151028.
Follow-up of https://github.com/rust-lang/rust/pull/150721.
So when we resolve an intra-doc link, its current context (the module from which we resolve in short) is very important. However, when we use an intra-doc link in a `#[deprecated]` attribute on a reexported item, we were using the context of the reexported item and not of the `use` itself. Meaning that if you have an intra-doc link `std::mem::drop` on an item from another crate (let's say `core`), then the import will simply fail since there is no `std` dependency.
Now comes the not so funny fix: at this point, we don't know anymore where the attribute came from (ie, from the reexport or from the reexported item) since we already merged the attribute at this point. The solution I found to go around this problem is to check if the item span contains the attribute, and if not, then we use the `inline_stmt_id` as context instead of the item's ID. I'm not super happy and I'm sure we'll find corner cases in the future (like with macros), however there are a few things that mitigate this fix:
1. The only way to generate an attribute with a macro with its item while having different spans is by using proc-macros. In that case, we can always default to the `inline_stmt_id` as context and be fine, but I guess we'll see when get there.
2. It only concerns reexports, so the area of the problem is quite restricted.
Hopefully this explanation made sense. :)
cc @folkertdev
r? @lolbinarycat
Update cargo submodule
15 commits in 8c133afcd5e0d69932fe11f5907683723f8d361d..85eff7c80277b57f78b11e28d14154ab12fcf643
2026-01-09 03:50:15 +0000 to 2026-01-15 16:18:08 +0000
- fix(lockfile): switch to `resolver.lockfile-path` config (rust-lang/cargo#16510)
- Moved build-script bins to `deps` directory (rust-lang/cargo#16515)
- Invalidate the whole build cache when `-Zno-embed-metadata` changes (rust-lang/cargo#16513)
- Do not create examples dir in build dir with new layout (rust-lang/cargo#16514)
- fix(git): avoid partial oid got zero padded (rust-lang/cargo#16511)
- Optimize cargo locate-project --workspace (rust-lang/cargo#16423)
- chore: Update typos (rust-lang/cargo#16507)
- refactor(git): remove unnecessary serialization (rust-lang/cargo#16505)
- fix(build-std): std link metadata propagate to user (rust-lang/cargo#16496)
- Improve error message for missing dependencies (rust-lang/cargo#16500)
- fix: preserve `dep_name` for build script metadata (rust-lang/cargo#16494)
- refactor(toml): clarify `to_dependency` for config patch (rust-lang/cargo#16492)
- Add `--id` flag to `cargo report timings` and `cargo report rebuilds` (rust-lang/cargo#16490)
- Display lockfile path in very verbose mode when blocking (rust-lang/cargo#16491)
- fix(info): resolve underscore vs hyphen mismatch in schema lookup (rust-lang/cargo#16455)
r? ghost
Avoid serde dependency in build_helper when not necessary
Run-make-support doesn't need the metrics code to be pulled in ever. And bootstrap only needs it in CI where build metrics support is enabled.
rustc_target: Remove unused Arch::PowerPC64LE
This variant has been added in https://github.com/rust-lang/rust/pull/147645, but actually unused since target_arch for powerpc64le- targets is "powerpc64". (The difference between powerpc64- and powerpc64le- targets is identified by target_endian.)
Note: This is an internal cleanup and does NOT remove `powerpc64le-*` targets.
Remove `FeedConstTy` and provide ty when lowering const arg
r? @BoxyUwU
edit: BoxyUwU
`FeedConstTy` currently only provides the expected type of a const argument *sometimes* (e.g. previously array lengths did not do this). This causes problems with mGCA's directly represented const arguments which always need to know their expected type.
rustdoc: Fix intra-doc link bugs involving type aliases and associated items
This PR:
- Add support for linking to fields of variants behind a type alias.
- Correctly resolve links to fields and variants behind a type alias to the alias's version of the docs.
- Refactor some intra-doc links code to make it simpler.
- Add tests for the status quo of linking to associated items behind aliases.
Future steps:
- Nail down the rules of when inherent and trait impls are inlined into an alias's docs, and when impls on the alias appear for the aliased type.
- Adjust the resolutions of intra-doc links, through aliases, to associated items based on these rules.
r? @GuillaumeGomez
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#149408 (refactor: remove Ord bound from BinaryHeap::new etc)
- rust-lang/rust#150406 (Change some `matches!(.., .. if ..)` with let-chains)
- rust-lang/rust#150723 (std: move `errno` and related functions into `sys::io`)
- rust-lang/rust#150877 (resolve: Refactor away the side table `decl_parent_modules`)
- rust-lang/rust#150902 (Update to_uppercase docs to avoid ß->SS example)
- rust-lang/rust#151034 (std: Change UEFI env vars to volatile storage)
- rust-lang/rust#151036 (Better handle when trying to iterate on a `Range` of a type that isn't `Step`)
- rust-lang/rust#151067 (Avoid should-fail in two ui tests and a codegen-llvm test)
- rust-lang/rust#151072 (also handle ENOTTY ioctl errors when checking pidfd -> pid support)
- rust-lang/rust#151077 (Recognize potential `impl<const N: usize>` to `impl<N>` mistake)
- rust-lang/rust#151096 (Remove `Deref`/`DerefMut` impl for `Providers`.)
Failed merges:
- rust-lang/rust#150939 (resolve: Relax some asserts in glob overwriting and add tests)
r? @ghost
Remove `Deref`/`DerefMut` impl for `Providers`.
It's described as a "backwards compatibility hack to keep the diff small". Removing it requires only a modest amount of churn, and the resulting code is clearer without the invisible derefs.
r? @oli-obk
It's described as a "backwards compatibility hack to keep the diff
small". Removing it requires only a modest amount of churn, and the
resulting code is clearer without the invisible derefs.
Make `--print=check-cfg` output compatible `--check-cfg` arguments
This PR changes significantly the output of the unstable `--print=check-cfg` option.
Specifically it removes the ad-hoc resemblance with `--print=cfg` in order to output a simplified but still compatible `--check-cfg` arguments.
The goal is to future proof the output of `--print=check-cfg` like `--check-cfg` is, and the best way to do that is to use it's syntax.
This is particularly relevant for [RFC3905](https://github.com/rust-lang/rfcs/pull/3905) which wants to introduce a new predicate: `version(...)`.
Update books
## rust-lang/nomicon
2 commits in 5b3a9d084cbc64e54da87e3eec7c7faae0e48ba9..050c002a360fa45b701ea34feed7a860dc8a41bf
2026-01-10 15:05:01 UTC to 2026-01-09 23:34:23 UTC
- Correct false typo fix in safe-unsafe-meaning.md (rust-lang/nomicon#518)
- Fix grammar and typos in safe-unsafe-meaning.md (rust-lang/nomicon#517)
## rust-lang/reference
2 commits in 6363385ac4ebe1763f1e6fb2063c0b1db681a072..28b5a54419985f03db5294de5eede71b6665b594
2026-01-03 19:09:24 UTC to 2026-01-03 18:10:24 UTC
- RISC-V Extensions update including 29 extensions to stabilize (rust-lang/reference#1987)
- Update note about shebang removal in `include`d files (rust-lang/reference#2127)
## rust-lang/rust-by-example
1 commits in 2e02f22a10e7eeb758e6aba484f13d0f1988a3e5..8de6ff811315ac3a96ebe01d74057382e42ffdee
2026-01-06 00:16:33 UTC to 2026-01-06 00:16:33 UTC
- Update comments on iterator behavior in closure examples (rust-lang/rust-by-example#1983)
Improve span for "unresolved intra doc link" on `deprecated` attribute
Follow-up of rust-lang/rust#150721.
To make this work, I replaced the `Symbol` by an `Ident` to keep the `Span` information.
cc @folkertdev
r? @camelid
Dogfood `-Zno-embed-metadata` in the standard library
This PR dogfoods the [`-Zno-embed-metadata`](https://github.com/rust-lang/cargo/issues/15495) flag in the standard library. This removes the .rmeta portion out of the `libstd.so` file, thus reducing its filesize on disk. Notably, this reduces the amount of MiB that we ship to people who download the standard library.
I think that the only way to find out what this breaks is to try to run full CI, and then try to land it on nightly :)
r? @ghost