File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 runs-on : ubuntu-latest
1313 strategy :
1414 matrix :
15- rust : [stable, nightly, 1.48 ]
15+ rust : [stable, nightly, 1.63 ]
1616
1717 env :
1818 RUSTFLAGS : -D warnings
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ description = "Generated bindings for Linux's userspace API"
66documentation = " https://docs.rs/linux-raw-sys"
77license = " Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
88repository = " https://github.com/sunfishcode/linux-raw-sys"
9- edition = " 2018 "
9+ edition = " 2021 "
1010keywords = [" linux" , " uapi" , " ffi" ]
1111categories = [" external-ffi-bindings" ]
1212exclude = [" /gen" , " /.*" ]
13- rust-version = " 1.48 "
13+ rust-version = " 1.63 "
1414
1515[dependencies ]
1616core = { version = " 1.0.0" , optional = true , package = " rustc-std-workspace-core" }
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ exported by Linux's headers but nonetheless needed by userspace.
3636# Minimum Supported Rust Version (MSRV)
3737
3838This crate currently works on the version of [ Rust on Debian stable] , which is
39- currently Rust 1.48 . This policy may change in the future, in minor version
39+ currently Rust 1.63 . This policy may change in the future, in minor version
4040releases, so users using a fixed version of Rust should pin to a specific
4141version of this crate.
4242
Original file line number Diff line number Diff line change 11[package ]
22name = " gen"
33version = " 0.0.0"
4- edition = " 2018 "
4+ edition = " 2021 "
55publish = false
66
77[dependencies ]
Original file line number Diff line number Diff line change @@ -90,8 +90,7 @@ pub mod cmsg_macros {
9090 ( len + c_long_size - 1 ) & !( c_long_size - 1 )
9191 }
9292
93- // TODO: In Rust 1.63 we can make this a `const fn`.
94- pub unsafe fn CMSG_DATA ( cmsg : * const cmsghdr ) -> * mut c_uchar {
93+ pub const unsafe fn CMSG_DATA ( cmsg : * const cmsghdr ) -> * mut c_uchar {
9594 ( cmsg as * mut c_uchar ) . add ( size_of :: < cmsghdr > ( ) )
9695 }
9796
@@ -103,8 +102,7 @@ pub mod cmsg_macros {
103102 size_of :: < cmsghdr > ( ) as c_uint + len
104103 }
105104
106- // TODO: In Rust 1.63 we can make this a `const fn`.
107- pub unsafe fn CMSG_FIRSTHDR ( mhdr : * const msghdr ) -> * mut cmsghdr {
105+ pub const unsafe fn CMSG_FIRSTHDR ( mhdr : * const msghdr ) -> * mut cmsghdr {
108106 if ( * mhdr) . msg_controllen < size_of :: < cmsghdr > ( ) as _ {
109107 return ptr:: null_mut ( ) ;
110108 }
@@ -178,9 +176,8 @@ pub mod signal_macros {
178176 /// `SIG_IGN` value into a function pointer in a `const` initializer, so
179177 /// we make it a function instead.
180178 ///
181- // TODO: In Rust 1.56 we can make this a `const fn`.
182179 #[ inline]
183- pub fn sig_ign ( ) -> super :: general:: __kernel_sighandler_t {
180+ pub const fn sig_ign ( ) -> super :: general:: __kernel_sighandler_t {
184181 // Safety: This creates an invalid pointer, but the pointer type
185182 // includes `unsafe`, which covers the safety of calling it.
186183 Some ( unsafe {
You can’t perform that action at this time.
0 commit comments