Repository navigation
Update the repo toolchain to Rust 1.99.1 [Rebase & FF] - #1869
Conversation
✅ QEMU Validation PassedAll QEMU validation jobs completed successfully.
Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/38313328431 Boot Time to EFI Shell
Dependencies
This comment was automatically generated by the Patina QEMU PR Validation Post workflow. |
|
Note: Slightly related to this, I'm going to file a tracking issue for updating the MSRV to 1.95.0 sometime in the near future as a 1.95.0 to 1.99.0 window still provides a bit of room and allows picking up some useful new features without backward compat. |
|
I will push an update for mdbook soon. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
os-d
left a comment
There was a problem hiding this comment.
I see you said you'd file an issue for updating the MSRV, I do think we should have a tracking issue for the items we have some odd staging for in order to handle the MSRV so that we don't forget to undo it later, e.g. tracking the va_arg! macro to remove after the MSRV is 1.99.
|
Yeah, I'll file an issue for each of those. 1.95.0 was released in April 2026 so I'm not sure it makes sense to go there quite yet, but I'll file an issue for each of the items waiting on something. |
Pushed |
Done |
vineelko
left a comment
There was a problem hiding this comment.
idt_page.as_chunks_mut::<{ core::mem::size_of::<IdtEntry>() }>()Passing const value like this(in blocks) is new to me.
Apparently even below seems to be working(not related to the code change) as long as it can be compile time evaluated.
idt_page.as_chunks_mut::<{ let x = 10; x + core::mem::size_of::<IdtEntry>() }>()but not this :-)
idt_page.as_chunks_mut::<{ let x = 10; println!("asdfasdf"); core::mem::size_of::<IdtEntry>() }>()|
Revised to update to Rust 1.99.1 instead of 1.99.0 to pick up fixes for the issues in https://blog.rust-lang.org/2026/10/15/Rust-1.99.1/. |
- `VaList::arg` became `next_arg` in 1.99, so pick the right one with rustversion. See: https://doc.rust-lang.org/std/ffi/struct.VaList.html#method.next_arg - `fetch_update` was deprecated in favor of `try_update` in Rust 1.99. For now, continue using `fetch_update` while maintaining compatibility with Rust 1.95 and later. See: - https://doc.rust-lang.org/1.99.0/core/sync/atomic/struct.Atomic.html#method.fetch_update - https://doc.rust-lang.org/1.99.0/core/sync/atomic/struct.Atomic.html#method.try_update - `feature(c_variadic)` became stable in Rust 1.99. However, because it is a crate-level inner attribute, it must be placed at the top of the crate (patina_dxe_core/src/lib.rs) to support < 1.99. To support this in Rust 1.99, an `allow(stable_features)` attribute was added with a note it can be removed when the MSRV is increased to >= 1.99. `cfg_version` could be used to conditionally add the feature, but `cfg_version` itself is currently unstable, not an allowed unstable feature in our current list, and it was not deemed necessary to enable it just for this case. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The `chunks_exact_to_as_chunks` clippy lint in Rust 1.99 flags `chunks_exact(N)` when called with a compile-time constant size. `as_chunks` has been stable since 1.88, so it is fine for the current MSRV of Rust 1.90.0. See: https://doc.rust-lang.org/1.99.0/core/primitive.slice.html#method.as_chunks Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Resolves new clippy lint issues after updating to Rust 1.99. Lints involved: - `clone_on_copy` - `uninlined_format_args` - `useless_borrows_in_formatting` - `byte_char_slices` - `drain_collect` - `question_mark` Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The `Pread`/`Pwrite` derives currently output `field: field` initializers that are flagged in clippy with Rust 1.99. To prevent every site having to allow this lint individually, it is allowed globally with a note that it can be disallowed again if the derive code in the scroll crate is updated. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Rust 1.97.0 added the `manual_assert_eq` lint to the pedantic group. https://rust-lang.github.io/rust-clippy/master/index.html?groups=pedantic This updates the code to pass this lint (pedantic is enabled). Purpose: Checks for `assert!` and `debug_assert!` usage that consist of only an (in)equality check. Why it's bad: `assert_{eq,ne}!` and `debug_assert_{eq,ne}!` achieve the same goal and provide some additional debug information. Note: The `char8`/`char16` test modules keep `==` and `!=` on purpose since they test the `PartialEq` impls. Also, `assert_is_empty` is allowed workspace-wide because its suggested form is harder to read. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
rustdoc in 1.99 produces an error on a footnote definition with no reference, so make it a plain note. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
These were found when running `cargo clippy` with Rust 1.90.0 (the current MSRV). A warning remains for `clippy::assert_is_empty` being an unknown lint. Errors and actual issues were addressed. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
After updating to Rust 1.99.0, these documentation blocks are failing to compile with `error: expected item after doc comment` errors. Since they're incomplete code examples that are still helpful for demonstration purposes, this marks them to be ignored. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Updates the examples in docs/src/dev/rust_version_update_process.md so they are easier to understand by reflecting the current toolchain being used. Note: Rust 1.99.1 is used here specifically to include two relevant fixes in that release, see https://blog.rust-lang.org/2026/10/15/Rust-1.99.1/. - Missing symbol wcslen - Miscompilation of FFI bool return values on x86_64 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Description
Updates the repo to Rust 1.99.1 from Rust 1.95. Does not change the Rust 1.90.0 MSRV.
https://releases.rs/docs/1.99.0/
Resolves #1797
Keep the 1.90 MSRV building with 1.99 API changes
VaList::argbecamenext_argin 1.99, so pick the right one withrustversion.
See: https://doc.rust-lang.org/std/ffi/struct.VaList.html#method.next_arg
fetch_updatewas deprecated in favor oftry_updatein Rust 1.99.For now, continue using
fetch_updatewhile maintainingcompatibility with Rust 1.95 and later.
See:
feature(c_variadic)became stable in Rust 1.99. However, becauseit is a crate-level inner attribute, it must be placed at the top of
the crate (patina_dxe_core/src/lib.rs) to support < 1.99.
To support this in Rust 1.99, an
allow(stable_features)attributewas added with a note it can be removed when the MSRV is increased
to >= 1.99.
cfg_versioncould be used to conditionally add thefeature, but
cfg_versionitself is currently unstable, not anallowed unstable feature in our current list, and it was not deemed
necessary to enable it just for this case.
Use as_chunks instead of chunks_exact
The
chunks_exact_to_as_chunksclippy lint in Rust 1.99 flagschunks_exact(N)when called with a compile-time constant size.as_chunkshas been stable since 1.88, so it is fine for the currentMSRV of Rust 1.90.0.
See: https://doc.rust-lang.org/1.99.0/core/primitive.slice.html#method.as_chunks
Fix the other new 1.99 clippy lints
Resolves new clippy lint issues after updating to Rust 1.99.
Lints involved:
clone_on_copyuninlined_format_argsuseless_borrows_in_formattingbyte_char_slicesdrain_collectquestion_markAllow the
redundant_field_nameslintThe
Pread/Pwritederives currently outputfield: fieldinitializers that are flagged in clippy with Rust 1.99.
To prevent every site having to allow this lint individually, it is
allowed globally with a note that it can be disallowed again if the
derive code in the scroll crate is updated.
Switch tests to assert_eq and allow assert_is_empty
Rust 1.97.0 added the
manual_assert_eqlint to the pedantic group.https://rust-lang.github.io/rust-clippy/master/index.html?groups=pedantic
This updates the code to pass this lint (pedantic is enabled).
Purpose:
Checks for
assert!anddebug_assert!usage that consist of only an(in)equality check.
Why it's bad:
assert_{eq,ne}!anddebug_assert_{eq,ne}!achieve the same goaland provide some additional debug information.
Note: The
char8/char16test modules keep==and!=on purposesince they test the
PartialEqimpls.Also,
assert_is_emptyis allowed workspace-wide because its suggestedform is harder to read.
Fix unused footnote in close_event docs
rustdoc in 1.99 produces an error on a footnote definition with no
reference, so make it a plain note.
Rust 1.90.0 clippy updates
These were found when running
cargo clippywith Rust 1.90.0(the current MSRV). A warning remains for
clippy::assert_is_emptybeing an unknown lint. Errors and actual issues were addressed.
docs: Ignore incomplete documentation snippets
After updating to Rust 1.99.0, these documentation blocks are failing
to compile with
error: expected item after doc commenterrors.Since they're incomplete code examples that are still helpful for
demonstration purposes, this marks them to be ignored.
Bump the toolchain to Rust 1.99.1
Updates the examples in docs/src/dev/rust_version_update_process.md
so they are easier to understand by reflecting the current toolchain
being used.
How This Was Tested
cargo make all(with Rust 1.99.1)Integration Instructions