Contents

Released on November 12, 2026, Rust 1.100.0 allows the never type in more positions and stabilizes custom allocator APIs for Vec and Box. Cargo’s dependency handling has also changed, and there are compatibility changes to review before adopting the release across a project.

Key Points#

  • The never type, !, can now be used as a type argument, allowing types such as Result<T, !> to represent operations that never return an error.
  • The stabilized allocator APIs let you specify custom allocators for individual Vec and Box values.
  • Cargo now warns about unused dependencies and supports an optional waiting period before newly published package versions become eligible for selection.
  • When upgrading, review type inference, tools that inspect build artifacts, and any use of 32-bit Windows hosts.

Expressing Impossible Errors with !#

The never type has no possible values. Rust already supported the -> ! notation as the return type of functions that never return normally. Version 1.100.0 also allows it in positions such as type arguments.

For example, Result<T, !> represents an operation that can return a successful value of type T but cannot produce an error value. This guarantee is explicit in the type. Infallible, previously used for this purpose, becomes an alias for !.

The never type fallback in Editions 2015, 2018, and 2021 also changes from () to !, matching Edition 2024. Some existing code may fail to compile or behave differently. If type inference changes cause problems, add explicit type annotations. If a dependency is affected, check whether a fixed version has been released.

Choosing an Allocator for Each Value#

The stabilized Allocator trait lets developers define how memory is allocated and deallocated. APIs such as Vec::new_in and Box::new_in let you choose a custom allocator for each vector or boxed value.

This is useful when different parts of a program need different memory allocation strategies. Projects that already need custom allocators can now use these APIs on stable Rust. Support for other collection and pointer types remains in progress.

Because some Box trait implementations now support custom allocators, existing code may encounter new type inference errors. Review compiler diagnostics after upgrading before making your own allocator changes.

Reviewing Cargo Dependencies#

Cargo now warns about dependencies declared in Cargo.toml that it considers unused. The cargo::unused_dependencies warning belongs to Cargo’s newly stabilized lint system, and its level can be configured under [lints.cargo].

Treat each warning as something to review. Detection coverage varies by command and build target, and excludes dev-dependencies. Dependencies that serve a necessary purpose may also be flagged, so check why they were added before removing them.

Cargo’s installation behavior also changes. By default, cargo install now uses the dependency versions recorded in the package’s bundled Cargo.lock. If no lockfile is included, it resolves dependencies as usual. Review installation procedures that previously relied on fresh dependency resolution.

Delaying Adoption of New Package Versions#

Cargo’s stabilized minimum publish age setting lets you exclude package versions that have not yet passed a specified waiting period. The default is "0", so upgrading alone does not introduce a waiting period.

To set a three-day waiting period, add the following to your project’s .cargo/config.toml:

snippet.txt
[registry]
global-min-publish-age = "3 days"

This waiting period gives scanners and maintainers time to detect some malicious releases before new versions become eligible for selection. It does not, however, guarantee that older packages are safe. Continue reviewing dependency updates, and account for the waiting period when planning urgent fixes.

Reviewing Cleanup and Build Tools#

DropGuard holds a value and a cleanup closure, then runs the closure when the guard is dropped. It enables rollback on early exit without defining a dedicated type that implements Drop. On success, DropGuard::dismiss retrieves the value without running the closure.

Other additions include Box::map, Vec::from_fn, and the unsafe function conjure_zst. The last function requires particular care. Even zero-sized values can represent safety conditions, such as holding a lock. Being zero-sized does not mean a value is safe to construct arbitrarily.

During migration, check these two operational changes:

  • Cargo now separates intermediate artifacts using directory names that include a hash of the build configuration. Update tools and tests that assume the previous layout.
  • Host tools for i686-pc-windows-msvc and i686-pc-windows-gnu are no longer distributed. Build 32-bit Windows binaries by cross-compiling from a supported host.

Next Steps#

On an upgrade branch, run your project’s existing CI test suite with Rust 1.100.0 and review compiler errors and Cargo warnings before changing application code to use the new APIs.

Source: https://gihyo.jp/article/2026/11/rust-1.100.0

Contents