feat!: bump supported Rust version to 1.85.0 and edition to 2024#244
Merged
bavshin-f5 merged 4 commits intonginx:mainfrom Jan 28, 2026
Merged
feat!: bump supported Rust version to 1.85.0 and edition to 2024#244bavshin-f5 merged 4 commits intonginx:mainfrom
bavshin-f5 merged 4 commits intonginx:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Rust toolchain to version 1.85.0 and migrates the codebase to Rust edition 2024, which introduces new unsafe operation requirements and import sorting conventions.
Changes:
- Updated minimum supported Rust version from 1.81.0 to 1.85.0
- Migrated from Rust edition 2021 to 2024
- Wrapped unsafe operations in
unsafeblocks as required by edition 2024
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updated edition and rust-version, added workspace lints for 2024 compatibility |
| rustfmt.toml | Changed edition from 2021 to 2024 |
| README.md | Updated minimum Rust version requirement in documentation |
| src/lib.rs | Updated documentation and changed #[no_mangle] to #[unsafe(no_mangle)] |
| src/sync.rs | Removed empty documentation line |
| src/log.rs | Reordered imports to follow convention |
| src/core/*.rs | Wrapped unsafe operations in unsafe blocks |
| src/http/*.rs | Wrapped unsafe operations in unsafe blocks, reformatted code |
| src/collections/*.rs | Wrapped unsafe operations in unsafe blocks |
| src/async_/*.rs | Wrapped unsafe operations in unsafe blocks, reordered imports |
| nginx-sys/src/*.rs | Wrapped unsafe operations in unsafe blocks |
| nginx-sys/build/main.rs | Added rust_edition and wrap_unsafe_ops configuration |
| nginx-sys/Cargo.toml | Added workspace lints |
| nginx-src/*.rs | Code formatting adjustments |
| examples/*.rs | Wrapped unsafe operations, updated #[no_mangle] attributes, reordered imports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ensh63
approved these changes
Jan 27, 2026
enforced by workspace level lints, now specified in each Cargo.toml, except nginx-sys, because bindgen can't be set to Edition2024 until MSRV hits 1.85 this change set is created automatically by `cargo fix --edition --all`, then with manual fixes afterwards: * Back out any use of unsafe(no_mangle) for plain no_mangle, since 1.81 wont accept it * remove uses of expr_2021 in macros, which is not available in the MSRV. * Manual fix to ngx_container_of! macro for safety rules in 2024, these weren't migrated automatically by `cargo fix` * Manual fixes to several other macros that created an &mut Request in an expression, Rust 2024 is stricter about taking &mut of temporaries, so instead the request is let-bound first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #96 (comment).
Includes #200.