Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8ecb54d

Browse files
Merge pull request #1586 from phip1611/edition-2024
rust: edition 2024
2 parents 7ff771e + 6eac8c1 commit 8ecb54d

File tree

127 files changed

+372
-320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+372
-320
lines changed

‎Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ members = [
1313
[workspace.package]
1414
authors = ["The Rust OSDev team"]
1515
categories = ["embedded", "no-std", "api-bindings"]
16-
edition = "2021"
16+
edition = "2024"
1717
keywords = ["uefi", "efi"]
1818
license = "MIT OR Apache-2.0"
1919
repository = "https://github.com/rust-osdev/uefi-rs"
20-
rust-version = "1.81"
20+
rust-version = "1.85.1"
2121

2222
[workspace.dependencies]
2323
bitflags = "2.0.0"

‎rustfmt.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# We keep this file explicitley to ensure that direct invocations of `rustfmt`
2+
# also use the proper style edition. Unlike `cargo fmt`, which forwards the
3+
# Rust edition specified in Cargo.toml to `rustfmt`, `rustfmt` still defaults to
4+
# the 2021 edition and is unaware of `Cargo.toml`.
5+
#
6+
# We use a direct invocation of `rustfmt` in our device path generation code.
7+
8+
style_edition = "2024"

‎template/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "uefi_app"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66

77
[dependencies]

‎uefi-macros/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# uefi-macros - [Unreleased]
22

3+
## Changed
4+
5+
- **Breaking:** The MSRV is now 1.85.1 and the crate uses the Rust 2024 edition.
36

47
# uefi-macros - 0.18.1 (2025年05月04日)
58

‎uefi-macros/src/lib.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ extern crate proc_macro;
77
use proc_macro::TokenStream;
88

99
use proc_macro2::TokenStream as TokenStream2;
10-
use quote::{quote, quote_spanned,TokenStreamExt};
10+
use quote::{TokenStreamExt, quote, quote_spanned};
1111
use syn::spanned::Spanned;
1212
use syn::{
13-
parse_macro_input, parse_quote, parse_quote_spanned,Error,Expr,ExprLit,ExprPath,ItemFn,
14-
ItemStruct,Lit,Visibility,
13+
Error,Expr,ExprLit,ExprPath,ItemFn,ItemStruct,Lit,Visibility, parse_macro_input,
14+
parse_quote, parse_quote_spanned,
1515
};
1616

1717
macro_rules! err {
@@ -69,13 +69,10 @@ pub fn unsafe_protocol(args: TokenStream, input: TokenStream) -> TokenStream {
6969
quote!(::uefi::guid!(#lit))
7070
}
7171
Expr::Path(ExprPath { path, .. }) => quote!(#path),
72-
_ => {
73-
return err!(
74-
expr,
75-
"macro input must be either a string literal or path to a constant"
76-
)
77-
.into()
78-
}
72+
_ => err!(
73+
expr,
74+
"macro input must be either a string literal or path to a constant"
75+
),
7976
};
8077

8178
let item_struct = parse_macro_input!(input as ItemStruct);
@@ -215,7 +212,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
215212
let result = quote! {
216213
#fn_type_check
217214

218-
#[export_name = "efi_main"]
215+
#[unsafe(export_name = "efi_main")]
219216
#f
220217

221218
};

‎uefi-raw/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
- `DevicePathProtocol` now derives
2424
`Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash`
2525

26+
## Changed
27+
28+
- **Breaking:** The MSRV is now 1.85.1 and the crate uses the Rust 2024 edition.
29+
2630

2731
# uefi-raw - 0.10.0 (2025年02月07日)
2832

‎uefi-raw/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ license.workspace = true
1616
repository.workspace = true
1717
# uefi-raw is much less likely to need the latest bleeding-edge features.
1818
# Hence, it is okay to not use the workspace MSRV.
19-
rust-version = "1.77"
19+
rust-version = "1.85.1"
2020

2121
[dependencies]
2222
bitflags.workspace = true

‎uefi-raw/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub mod time;
3434
mod status;
3535

3636
pub use status::Status;
37-
pub use uguid::{guid,Guid};
37+
pub use uguid::{Guid, guid};
3838

3939
use core::ffi::c_void;
4040
use core::fmt::{self, Debug, Formatter};

‎uefi-raw/src/protocol/ata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use super::device_path::DevicePathProtocol;
44
use crate::{Event, Status};
55
use core::ffi::c_void;
6-
use uguid::{guid,Guid};
6+
use uguid::{Guid, guid};
77

88
bitflags::bitflags! {
99
/// ATA Controller attributes.

‎uefi-raw/src/protocol/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: MIT OR Apache-2.0
22

3-
use crate::{guid,Boolean, Guid, Status};
3+
use crate::{Boolean, Guid, Status, guid};
44
use core::ffi::c_void;
55

66
/// Logical block address.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /