Commit graph

315527 commits

Author SHA1 Message Date
Jonathan Brouwer
cbcd1c3eef
Rollup merge of #151036 - issue-151026, r=mati865
Better handle when trying to iterate on a `Range` of a type that isn't `Step`

Mention when a trait bound corresponds to an unstable trait.

Mention `Range` when `Step` bound is unment, and explain that only some std types impl `Iterator` for `Range`.

CC rust-lang/rust#151026
2026-01-14 11:05:40 +01:00
Jonathan Brouwer
4874f18c54
Rollup merge of #151034 - bishop-fix-nv, r=joboet
std: Change UEFI env vars to volatile storage

The UEFI variables set by the env vars should be volatile, otherwise they will persist after reboot and use up scarce non-volatile storage.

CC @Ayush1325
2026-01-14 11:05:39 +01:00
Jonathan Brouwer
28476376f9
Rollup merge of #150902 - docs-150888-to_uppercase, r=Noratrieb,workingjubilee
Update to_uppercase docs to avoid ß->SS example

Fixes rust-lang/rust#150888

Updates the `to_uppercase` documentation examples to avoid relying on the ß → "SS" mapping and instead uses a stable multi-character case-mapping example ('ffi' → "FFI").

Note: the example uses U+FB03 (LATIN SMALL LIGATURE FFI), not the ASCII string "ffi".
2026-01-14 11:05:39 +01:00
Jonathan Brouwer
129f88cf5c
Rollup merge of #150877 - declmod, r=nnethercote
resolve: Refactor away the side table `decl_parent_modules`

Instead keep parent modules in `DeclData` itself.
Follow up to https://github.com/rust-lang/rust/pull/150445.

r? @nnethercote
2026-01-14 11:05:38 +01:00
Jonathan Brouwer
95ea4c5699
Rollup merge of #150723 - move_pal_error, r=@tgross35
std: move `errno` and related functions into `sys::io`

Part of rust-lang/rust#117276.

Currently, `errno` and related functions like `decode_error_kind` are split across `sys::pal` and `sys::pal::os`. This PR moves all of them into a new module inside `sys::io`.
2026-01-14 11:05:38 +01:00
Jonathan Brouwer
4e4bee8add
Rollup merge of #150406 - matches-let-chain, r=Kivooeo,oli-obk,BoxyUwU,fmease
Change some `matches!(.., .. if ..)` with let-chains

Follow up to rust-lang/rust#149933.
2026-01-14 11:05:37 +01:00
Jonathan Brouwer
91429523f1
Rollup merge of #149408 - aatifsyed/binary-heap-no-ord, r=tgross35,dtolnay
refactor: remove Ord bound from BinaryHeap::new etc

This adds consistency with e.g `BTreeMap::new`, and makes it easier to e.g `#[derive(Default)]`[^1]

[^1]: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=f848e472a176fae155f17455bdfe0aee
2026-01-14 11:05:36 +01:00
bors
4931e09e3a Auto merge of #151087 - GuillaumeGomez:rollup-vIdiReJ, r=GuillaumeGomez
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#150587 (triagebot: add A-rustdoc-js autolabel)
 - rust-lang/rust#150677 (Improve std::path::Path::join documentation)
 - rust-lang/rust#150737 (diagnostics: make implicit Sized bounds explicit in E0277)
 - rust-lang/rust#150771 (Remove legacy homu `try` and `auto` branch mentions)
 - rust-lang/rust#150840 (Make `--print=check-cfg` output compatible `--check-cfg` arguments)
 - rust-lang/rust#150915 (Regression test for type params on eii)
 - rust-lang/rust#151017 (Port the rustc dump attributes to the attribute parser)
 - rust-lang/rust#151019 (Make `Type::of` support unsized types)
 - rust-lang/rust#151031 (Support arrays in type reflection)
 - rust-lang/rust#151043 (armv7-unknown-linux-uclibceabihf.md: Fix bootstrap.toml syntax)
 - rust-lang/rust#151052 (ui: add regression test for macro resolution ICE (issue rust-lang/rust#150711))
 - rust-lang/rust#151053 (Reduce flakyness for `tests/rustdoc-gui/notable-trait.goml`)
 - rust-lang/rust#151055 (Emit error instead of delayed bug when meeting mismatch type for const array)

r? @ghost
2026-01-14 03:26:31 +00:00
Guillaume Gomez
3adbd3ae4e
Rollup merge of #151055 - mgca-arr, r=BoxyUwU
Emit error instead of delayed bug when meeting mismatch type for const array

r? BoxyUwU

resolve: rust-lang/rust#151024

cc: https://github.com/rust-lang/rust/pull/150869
2026-01-13 23:39:13 +01:00
Guillaume Gomez
860e60a786
Rollup merge of #151053 - reduce-gui-test-flakyness, r=jieyouxu
Reduce flakyness for `tests/rustdoc-gui/notable-trait.goml`

Fixes https://github.com/rust-lang/rust/issues/151006 (hopefully).

Instead of asserting right away, it waits for the element count to be the one expected.

r? @jieyouxu
2026-01-13 23:39:13 +01:00
Guillaume Gomez
5b7fc2fcc7
Rollup merge of #151052 - add-test-ice-in-resolve, r=Kivooeo
ui: add regression test for macro resolution ICE (issue #150711)

Added a new test in `test/ui/resolve` for a macro
resolution scenario that previously caused an ICE.

Files added:
- `tests/ui/resolve/decl-macro-use-no-ice.rs`
- `tests/ui/resolve/decl-macro-use-no-ice.stderr`

Fixes rust-lang/rust#150711

r? @matthiaskrgr
r? @petrochenkov
2026-01-13 23:39:12 +01:00
Guillaume Gomez
770919211f
Rollup merge of #151043 - patch-1, r=ehuss
armv7-unknown-linux-uclibceabihf.md: Fix bootstrap.toml syntax

With the suggested value we were getting instead:

```
ERROR: Failed to parse '/tmp/rust/bootstrap.toml': unknown field `stage`, expected one of `build`, `description`, `host`, `target`, `build-dir`, `cargo`, `rustc`, `rustfmt`, `cargo-clippy`, `docs`, `compiler-docs`, `library-docs-private-items`, `docs-minification`, `submodules`, `gdb`, `lldb`, `nodejs`, `npm`, `yarn`, `python`, `windows-rc`, `reuse`, `locked-deps`, `vendor`, `full-bootstrap`, `bootstrap-cache-path`, `extended`, `tools`, `tool`, `verbose`, `sanitizers`, `profiler`, `cargo-native-static`, `low-priority`, `configure-args`, `local-rebuild`, `print-step-timings`, `print-step-rusage`, `check-stage`, `doc-stage`, `build-stage`, `test-stage`, `install-stage`, `dist-stage`, `bench-stage`, `patch-binaries-for-nix`, `metrics`, `android-ndk`, `optimized-compiler-builtins`, `jobs`, `compiletest-diff-tool`, `compiletest-allow-stage0`, `compiletest-use-stage0-libtest`, `tidy-extra-checks`, `ccache`, `exclude` for key `build`
```
2026-01-13 23:39:12 +01:00
Guillaume Gomez
a8e3ce50b9
Rollup merge of #151031 - reflect-arrays, r=oli-obk
Support arrays in type reflection

Tracking issue: rust-lang/rust#146922

This PR adds support for inspecting arrays `[T; N]` through type reflection. It does so by adding `TypeKind::Array` and the `Array` struct:

```rust
pub struct Array {
    pub element_ty: TypeId,
    pub len: usize,
}
```

This can be used to inspect arrays like so:

```rust
match const { Type::of::<[u16; 4]>() }.kind {
    TypeKind::Array(array) => {
        assert_eq!(array.element_ty, TypeId::of::<u16>());
        assert_eq!(array.len, 4);
    }
    _ => unreachable!(),
}
```

r? @oli-obk
2026-01-13 23:39:11 +01:00
Guillaume Gomez
93dc648735
Rollup merge of #151019 - type-of-unsized, r=oli-obk
Make `Type::of` support unsized types

Tracking issue: rust-lang/rust#146922
Fixes rust-lang/rust#151018

`Type::of` is a utility function for getting type reflection information, and internally just calls `TypeId::of::<T>().info()`. `Type::of` does not support unsized types like `str` and `[u8]` because it is missing a `?Sized` bound. I believe this is an oversight rather than an intentional decision, as `TypeId::of` _does_ support unsized types and `Type::size` is an `Option` to support types without sizes.

This PR adds a `?Sized` bound to `Type::of` and extends the `dump.rs` test to ensure unsized types work in the future.

r? @oli-obk
2026-01-13 23:39:11 +01:00
Guillaume Gomez
3bbce8f20a
Rollup merge of #151017 - rustc_dump, r=jdonszelmann
Port the rustc dump attributes to the attribute parser

Tracking issue has been updated: https://github.com/rust-lang/rust/issues/131229
Five easy ones

r? @jdonszelmann
2026-01-13 23:39:10 +01:00
Guillaume Gomez
0d3692a437
Rollup merge of #150915 - eii-regression-test-149983, r=kivooeo
Regression test for type params on eii

Somewhere along the line I fixed this one with my other PRs. This just adds the regression tests

Closes rust-lang/rust#149983
2026-01-13 23:39:10 +01:00
Guillaume Gomez
080c7043c1
Rollup merge of #150840 - print-check-cfg-rework-output, r=nnethercote
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(...)`.
2026-01-13 23:39:09 +01:00
Guillaume Gomez
66f25e9d8d
Rollup merge of #150771 - remove-homu-branches, r=marcoieni
Remove legacy homu `try` and `auto` branch mentions

~~To be merged once we get rid of homu.~~ I think that we can merge this now.
2026-01-13 23:39:09 +01:00
Guillaume Gomez
6c700ecd6a
Rollup merge of #150737 - smithdb3/fix-150576, r=chenyukang
diagnostics: make implicit Sized bounds explicit in E0277

When a trait parameter depends upon Sized, the error message only referred to the full trait itself and didn't mention Sized. This makes the failure to implement Sized explicit. It also notes when the Sized trait bound is explicit or implicit.

Fixes rust-lang/rust#150576
2026-01-13 23:39:08 +01:00
Guillaume Gomez
7fc878cb82
Rollup merge of #150677 - improve-doc, r=Mark-Simulacrum
Improve std::path::Path::join documentation

Adapt `PathBuf::push` documentation for `Path::join` and add it to `join`'s docs

rust-lang/rust#146447
2026-01-13 23:39:08 +01:00
Guillaume Gomez
bf31616b85
Rollup merge of #150587 - add-rustdoc-js-autolabel, r=fmease
triagebot: add A-rustdoc-js autolabel

Adds an autolabel rule for rustdoc JavaScript/TypeScript files so PRs touching
rustdoc frontend assets and related tests are automatically labeled `A-rustdoc-js`.

Fixes rust-lang/rust#137983
2026-01-13 23:39:07 +01:00
bors
fcac501a73 Auto merge of #151015 - JonathanBrouwer:fix-cratelevel-perf, r=jdonszelmann
Fix perf of `check_crate_level` refactor

Fixes the perf of https://github.com/rust-lang/rust/pull/150930
The problem is that `allowed_targets` allocates a `Vec`

(also moves a comment around to a move useful place)

r? @jdonszelmann
2026-01-13 22:19:26 +00:00
Esteban Küber
1fe705ca70 Mention the type in the label, to avoid confusion at the cost of redundancy 2026-01-13 19:47:06 +00:00
Vadim Petrochenkov
c4820e6cb4 resolve: Refactor away the side table decl_parent_modules
Instead keep parent modules in `DeclData` itself
2026-01-13 20:59:26 +03:00
bors
2850ca8295 Auto merge of #150859 - nnethercote:opt-Canonicalizer-flag-checks, r=lcnr
Optimize canonicalizer flag checks.

The most important change here relates to type folding: we now check the flags up front, instead of doing it in `inner_fold_ty` after checking the cache and doing a match. This is a small perf win, and matches other similar folders (e.g. `CanonicalInstantiator`).

Likewise for const folding, we now check the flags first. (There is no cache for const folding.)

Elsewhere we don't check flags before folding a predicate (unnecessary, because `fold_predicate` already checks the flags itself before doing anything else), and invert the flag checks in a couple of methods to match the standard order.

r? @lcnr
2026-01-13 17:36:45 +00:00
BD103
71f8ea99fe refactor: move tuples type info ui test to coretest 2026-01-13 12:19:37 -05:00
BD103
e027ecdbb5 feat: support arrays in type reflection 2026-01-13 12:18:57 -05:00
Esteban Küber
814647f047 Change some matches!(.., .. if ..) with let-chains 2026-01-13 17:13:22 +00:00
Esteban Küber
27e09ce0be Update ui-fulldeps --stage 2 tests 2026-01-13 16:53:21 +00:00
Jonathan Brouwer
abcbf72bab
Port #[rustc_dump_predicates] 2026-01-13 15:25:28 +01:00
Jonathan Brouwer
a4c34b421c
Port #[rustc_dump_vtable] 2026-01-13 15:25:28 +01:00
Jonathan Brouwer
2a455409e3
Port #[rustc_dump_item_bounds] 2026-01-13 15:25:27 +01:00
Jonathan Brouwer
cf4d480eff
Port #[rustc_dump_def_parents] 2026-01-13 15:25:27 +01:00
Jonathan Brouwer
84d59d0731
Port #[rustc_dump_user_args] 2026-01-13 15:25:24 +01:00
bors
9b81629631 Auto merge of #139493 - Voultapher:explicitly-export-core-and-std-macros, r=petrochenkov
Explicitly export core and std macros

Currently all core and std macros are automatically added to the prelude via #[macro_use]. However a situation arose where we want to add a new macro `assert_matches` but don't want to pull it into the standard prelude for compatibility reasons. By explicitly exporting the macros found in the core and std crates we get to decide on a per macro basis and can later add them via the rust_20xx preludes.

Closes https://github.com/rust-lang/rust/issues/53977
Unlocks https://github.com/rust-lang/rust/pull/137487

Reference PR:

- https://github.com/rust-lang/reference/pull/2077

# Stabilization report lib

Everything N/A or already covered by lang report except, breaking changes: The unstable and never intended for public use `format_args_nl` macro is no longer publicly accessible as requested by @petrochenkov. Affects <10 crates including dependencies.

# Stabilization report lang

## Summary

Explicitly export core and std macros.

This change if merged would change the code injected into user crates to no longer include #[macro_use] on extern crate core and extern crate std. This change is motivated by a near term goal and a longer term goal. The near term goal is to allow a macro to be defined at the std or core crate root but not have it be part of the implicit prelude. Such macros can then be separately promoted to the prelude in a new edition. Specifically this is blocking the stabilization of assert_matches rust-lang/rust#137487. The longer term goal is to gradually deprecate #[macro_use]. By no longer requiring it for standard library usage, this serves as a step towards that goal. For more information see rust-lang/rust#53977.

PR link: https://github.com/rust-lang/rust/pull/139493

Tracking:

- https://github.com/rust-lang/rust/issues/147319

Reference PRs:

- https://github.com/rust-lang/rust/pull/139493

cc @rust-lang/lang @rust-lang/lang-advisors

### What is stabilized

Stabilization:
    
* `#[macro_use]` is no longer automatically included in the crate root module. This allows the explicit import of macros in the `core` and `std` prelude e.g. `pub use crate::dbg;`.

* `ambiguous_panic_imports` lint. Code that previously passed without warnings, but included the following or equivalent - only pertaining to core vs std panic - will now receive a warning:

  ```rust
  #![no_std]
  extern crate std;
  use std::prelude::v1::*;
  fn xx() {
      panic!(); // resolves to core::panic
      //~^ WARNING `panic` is ambiguous
      //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  }
  ```

  This lint is tied to a new exception to the name resolution logic in [compiler/rustc_resolve/src/ident.rs](https://github.com/rust-lang/rust/pull/139493/files#diff-c046507afdba3b0705638f53fffa156cbad72ed17aa01d96d7bd1cc10b8d9bce) similar to an exception added for https://github.com/rust-lang/rust/issues/145575. Specifically this only happens if the import of two builtin macros is ambiguous and they are named `sym::panic`. I.e. this can only happen for `core::panic` and `std::panic`. While there are some tiny differences in what syntax is allowed in `std::panic` vs `core::panic` in editions 2015 and 2018, [see](https://github.com/rust-lang/rust/pull/139493#issuecomment-2796481622). The behavior at runtime will always be the same if it compiles, implying minimal risk in what specific macro is resolved. At worst some closed source project not captured by crater will stop compiling because a different panic is resolved than previously and they were using obscure syntax like `panic!(&String::new())`.

## Design

N/A

### Reference

> What updates are needed to the Reference? Link to each PR. If the Reference is missing content needed for describing this feature, discuss that.

- https://github.com/rust-lang/reference/pull/2077

### RFC history

> What RFCs have been accepted for this feature?

N/A

### Answers to unresolved questions

N/A

### Post-RFC changes

> What other user-visible changes have occurred since the RFC was accepted? Describe both changes that the lang team accepted (and link to those decisions) as well as changes that are being presented to the team for the first time in this stabilization report.

N/A

### Key points

> What decisions have been most difficult and what behaviors to be stabilized have proved most contentious? Summarize the major arguments on all sides and link to earlier documents and discussions.

- Nothing was really contentious.

### Nightly extensions

> Are there extensions to this feature that remain unstable? How do we know that we are not accidentally committing to those?

N/A

### Doors closed

> What doors does this stabilization close for later changes to the language? E.g., does this stabilization make any other RFCs, lang experiments, or known in-flight proposals more difficult or impossible to do later?

No known doors are closed.

## Feedback

### Call for testing

> Has a "call for testing" been done? If so, what feedback was received?

No.

### Nightly use

> Do any known nightly users use this feature? Counting instances of `#![feature(FEATURE_NAME)]` on GitHub with grep might be informative.

N/A

## Implementation

### Major parts

> Summarize the major parts of the implementation and provide links into the code and to relevant PRs.
>
> See, e.g., this breakdown of the major parts of async closures:
>
> - <https://rustc-dev-guide.rust-lang.org/coroutine-closures.html>

The key change is [compiler/rustc_builtin_macros/src/standard_library_imports.rs](https://github.com/rust-lang/rust/pull/139493/files#diff-be08752823b8f862bb0c7044ef049b0f4724dbde39306b98dea2adb82ec452b0) removing the macro_use inject and the `v1.rs` preludes now explicitly `pub use`ing the macros https://github.com/rust-lang/rust/pull/139493/files#diff-a6f9f476d41575b19b399c6d236197355556958218fd035549db6d584dbdea1d + https://github.com/rust-lang/rust/pull/139493/files#diff-49849ff961ebc978f98448c8990cf7aae8e94cb03db44f016011aa8400170587.

### Coverage

> Summarize the test coverage of this feature.
>
> Consider what the "edges" of this feature are. We're particularly interested in seeing tests that assure us about exactly what nearby things we're not stabilizing. Tests should of course comprehensively demonstrate that the feature works. Think too about demonstrating the diagnostics seen when common mistakes are made and the feature is used incorrectly.
>
> Within each test, include a comment at the top describing the purpose of the test and what set of invariants it intends to demonstrate. This is a great help to our review.
>
> Describe any known or intentional gaps in test coverage.
>
> Contextualize and link to test folders and individual tests.

A variety of UI tests including edge cases have been added.

### Outstanding bugs

> What outstanding bugs involve this feature? List them. Should any block the stabilization? Discuss why or why not.

An old bug is made more noticeable by this change https://github.com/rust-lang/rust/issues/145577 but it was recommended to not block on it https://github.com/rust-lang/rust/pull/139493#issuecomment-3288311495.

### Outstanding FIXMEs

> What FIXMEs are still in the code for that feature and why is it OK to leave them there?

```
// Turn ambiguity errors for core vs std panic into warnings.
// FIXME: Remove with lang team approval.
```

https://github.com/rust-lang/rust/pull/139493/files#diff-c046507afdba3b0705638f53fffa156cbad72ed17aa01d96d7bd1cc10b8d9bce

### Tool changes

> What changes must be made to our other tools to support this feature. Has this work been done? Link to any relevant PRs and issues.

- ~~rustfmt~~
- ~~rust-analyzer~~
- ~~rustdoc (both JSON and HTML)~~
- ~~cargo~~
- ~~clippy~~
- ~~rustup~~
- ~~docs.rs~~

No known changes needed or expected.

### Breaking changes

> If this stabilization represents a known breaking change, link to the crater report, the analysis of the crater report, and to all PRs we've made to ecosystem projects affected by this breakage. Discuss any limitations of what we're able to know about or to fix.

Breaking changes:

* It's possible for user code to invoke an ambiguity by defining their own macros with standard library names and glob importing them, e.g. `use nom::*` importing `nom::dbg`. In practice this happens rarely based on crater data. The 3 public crates where this was an issue, have been fixed. The ambiguous panic import is more common and affects a non-trivial amount of the public - and likely private - crate ecosystem. To avoid a breaking change, a new future incompatible lint was added ambiguous_panic_imports see https://github.com/rust-lang/rust/issues/147319. This allows current code to continue compiling, albeit with a new warning. Future editions of Rust make this an error and future versions of Rust can choose to make this error. Technically this is a breaking change, but crater gives us the confidence that the impact will be at worst a new warning for 99+% of public and private crates.

  ```rust
  #![no_std]
  extern crate std;
  use std::prelude::v1::*;
  fn xx() {
      panic!(); // resolves to core::panic
      //~^ WARNING `panic` is ambiguous
      //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  }
  ```

* Code using `#![no_implicit_prelude]` *and* Rust edition 2015 will no longer automatically have access to the prelude macros. The following works on nightly but would stop working with this change:

  ```rust
  #![no_implicit_prelude]
  // Uncomment to fix error.
  // use std::vec;
  fn main() {
      let _ = vec![3, 6];
  }
  ```

  Inversely with this change the `panic` and `unreachable` macro will always be in the prelude even if `#![no_implicit_prelude]` is specified.

  Error matrix when using `#![no_implicit_prelude]`,  means compiler passes 🚫 means compiler error:
  
  Configuration | Rust 2015 | Rust 2018+
  --------------|-----------|-----------
  Nightly (panic\|unreachable) macro |  | 🚫
  PR (panic\|unreachable) macro |  | 
  Nightly (column\|concat\|file\|line\|module_path\|stringify) macro |  | 
  PR (column\|concat\|file\|line\|module_path\|stringify) macro |  | 
  Nightly remaining macros |  | 🚫
  PR remaining macros | 🚫 | 🚫

  Addressing this issue is deemed expensive.

Crater found no instance of this pattern in use. Affected code can fix the issue by directly importing the macros. The new behavior matches the behavior of `#![no_implicit_prelude]` in Rust editions 2018 and beyond and it's intuitive meaning.

Crater report:

- https://crater-reports.s3.amazonaws.com/pr-139493-2/index.html (latest run, but partial run)
- https://crater-reports.s3.amazonaws.com/pr-139493-1/index.html (previous full run, one fix missing)

Crater analysis:

- Discussed in breaking changes.

PRs to affected crates:

- https://github.com/Michael-F-Bryan/gcode-rs/pull/57
- https://github.com/stbuehler/rust-ipcrypt/pull/1
- https://github.com/jcreekmore/dmidecode/pull/55

## Type system, opsem

### Compile-time checks

> What compilation-time checks are done that are needed to prevent undefined behavior?
>
> Link to tests demonstrating that these checks are being done.

N/A

### Type system rules

> What type system rules are enforced for this feature and what is the purpose of each?

N/A

### Sound by default?

> Does the feature's implementation need specific checks to prevent UB, or is it sound by default and need specific opt-in to perform the dangerous/unsafe operations? If it is not sound by default, what is the rationale?

N/A

### Breaks the AM?

> Can users use this feature to introduce undefined behavior, or use this feature to break the abstraction of Rust and expose the underlying assembly-level implementation? Describe this if so.

N/A

## Common interactions

### Temporaries

> Does this feature introduce new expressions that can produce temporaries? What are the scopes of those temporaries?

N/A

### Drop order

> Does this feature raise questions about the order in which we should drop values? Talk about the decisions made here and how they're consistent with our earlier decisions.

N/A

### Pre-expansion / post-expansion

> Does this feature raise questions about what should be accepted pre-expansion (e.g. in code covered by `#[cfg(false)]`) versus what should be accepted post-expansion? What decisions were made about this?

N/A

### Edition hygiene

> If this feature is gated on an edition, how do we decide, in the context of the edition hygiene of tokens, whether to accept or reject code. E.g., what token do we use to decide?

N/A

### SemVer implications

> Does this feature create any new ways in which library authors must take care to prevent breaking downstreams when making minor-version releases? Describe these. Are these new hazards "major" or "minor" according to [RFC 1105](https://rust-lang.github.io/rfcs/1105-api-evolution.html)?

No.

### Exposing other features

> Are there any other unstable features whose behavior may be exposed by this feature in any way? What features present the highest risk of that?

No.

## History

> List issues and PRs that are important for understanding how we got here.

- This change was asked for here https://github.com/rust-lang/rust/pull/137487#issuecomment-2770801974

## Acknowledgments

> Summarize contributors to the feature by name for recognition and so that those people are notified about the stabilization. Does anyone who worked on this *not* think it should be stabilized right now? We'd like to hear about that if so.

More or less solo developed by @Voultapher with some help from @petrochenkov.

## Open items

> List any known items that have not yet been completed and that should be before this is stabilized.

None.
2026-01-13 14:20:26 +00:00
reddevilmidzy
d616e6cb18 Emit error instead of delayed bug when meeting mismatch type for const
array
2026-01-13 21:36:53 +09:00
Jana Dönszelmann
b454f76bd1
ensure generics are still properly reported on EII *implementations*, and test this 2026-01-13 11:59:59 +01:00
Jana Dönszelmann
b64a9be97e
bless the tests 2026-01-13 11:59:59 +01:00
Jana Dönszelmann
d25f4718ad
deduplicate error message when EII has generics 2026-01-13 11:59:59 +01:00
Jana Dönszelmann
1d96806788
type params on eii 2026-01-13 11:59:59 +01:00
bors
db1484bdee Auto merge of #151051 - JonathanBrouwer:rollup-SuaGLmP, r=JonathanBrouwer
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#150151 (Destabilise `target-spec-json`)
 - rust-lang/rust#150826 (Add `f16` inline ASM support for s390x)
 - rust-lang/rust#150883 (Improve span for "unresolved intra doc link" on `deprecated` attribute)
 - rust-lang/rust#150934 (Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`)
 - rust-lang/rust#150943 (Port `#[must_not_suspend]` to attribute parser)
 - rust-lang/rust#150990 (std: sys: net: uefi: Make TcpStream Send)
 - rust-lang/rust#150995 (core: ptr: split_at_mut: fix typo in safety doc)
 - rust-lang/rust#150998 (Relax test expectation for @__llvm_profile_runtime_user)
 - rust-lang/rust#151002 (Remove a workaround for a bug (take 2))
 - rust-lang/rust#151005 (Fix typo in `MaybeUninit` docs)
 - rust-lang/rust#151011 (Update books)
 - rust-lang/rust#151029 (rustc-dev-guide subtree update)
 - rust-lang/rust#151032 (fix: added missing backtick in triagebot.toml)
 - rust-lang/rust#151035 (Don't suggest replacing closure parameter with type name)

r? @ghost
2026-01-13 10:47:20 +00:00
joboet
0f25fca1a1
update import in UI test 2026-01-13 11:08:27 +01:00
joboet
e259373ce9
std: move errno and related functions into sys::io 2026-01-13 11:08:27 +01:00
Guillaume Gomez
62849e6441 Reduce flakyness for tests/rustdoc-gui/notable-trait.goml 2026-01-13 10:22:34 +01:00
vsriram
ef9cbadc43 ui: add regression test for macro resolution ICE 2026-01-13 14:32:48 +05:30
Jonathan Brouwer
7ee6257470
Rollup merge of #151035 - issue-150693-closure-arg-suggestion, r=jieyouxu
Don't suggest replacing closure parameter with type name

When a closure has an inferred parameter type like `|ch|` and the expected type differs in borrowing (e.g., `char` vs `&char`), the suggestion would incorrectly propose `|char|` instead of something valid like `|ch: char|`.

This happened because the code couldn't walk explicit `&` references in the HIR when the type is inferred, and fell back to replacing the entire parameter span with the expected type name.

Fix by only emitting the suggestion when we can properly identify the `&` syntax to remove.

Fixes rust-lang/rust#150693
2026-01-13 09:01:35 +01:00
Jonathan Brouwer
2ad4bf2f74
Rollup merge of #151032 - main, r=Urgau
fix: added missing backtick in triagebot.toml

Adds the missing backtick (`) in triagebot.toml

cc: @Urgau
2026-01-13 09:01:35 +01:00
Jonathan Brouwer
0a200ad04f
Rollup merge of #151029 - rdg-sync, r=tshepang
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to e905666c5a.

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

r? @ghost
2026-01-13 09:01:35 +01:00
Jonathan Brouwer
ced35f87da
Rollup merge of #151011 - docs-update, r=ehuss
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)
2026-01-13 09:01:34 +01:00
Jonathan Brouwer
d47c0d0168
Rollup merge of #151005 - pr_doc_maybeuninit_typo, r=joboet
Fix typo in `MaybeUninit` docs

–- → – (extra ASCII minus after endash)

Introduced in https://github.com/rust-lang/rust/pull/140463 (11627f00c0).
2026-01-13 09:01:34 +01:00