File tree Expand file tree Collapse file tree 5 files changed +8
-11
lines changed Expand file tree Collapse file tree 5 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 12
12
runs-on : ubuntu-latest
13
13
strategy :
14
14
matrix :
15
- rust : [stable, nightly, 1.48 ]
15
+ rust : [stable, nightly, 1.63 ]
16
16
17
17
env :
18
18
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"
6
6
documentation = " https://docs.rs/linux-raw-sys"
7
7
license = " Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
8
8
repository = " https://github.com/sunfishcode/linux-raw-sys"
9
- edition = " 2018 "
9
+ edition = " 2021 "
10
10
keywords = [" linux" , " uapi" , " ffi" ]
11
11
categories = [" external-ffi-bindings" ]
12
12
exclude = [" /gen" , " /.*" ]
13
- rust-version = " 1.48 "
13
+ rust-version = " 1.63 "
14
14
15
15
[dependencies ]
16
16
core = { 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.
36
36
# Minimum Supported Rust Version (MSRV)
37
37
38
38
This 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
40
40
releases, so users using a fixed version of Rust should pin to a specific
41
41
version of this crate.
42
42
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " gen"
3
3
version = " 0.0.0"
4
- edition = " 2018 "
4
+ edition = " 2021 "
5
5
publish = false
6
6
7
7
[dependencies ]
Original file line number Diff line number Diff line change @@ -90,8 +90,7 @@ pub mod cmsg_macros {
90
90
( len + c_long_size - 1 ) & !( c_long_size - 1 )
91
91
}
92
92
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 {
95
94
( cmsg as * mut c_uchar ) . add ( size_of :: < cmsghdr > ( ) )
96
95
}
97
96
@@ -103,8 +102,7 @@ pub mod cmsg_macros {
103
102
size_of :: < cmsghdr > ( ) as c_uint + len
104
103
}
105
104
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 {
108
106
if ( * mhdr) . msg_controllen < size_of :: < cmsghdr > ( ) as _ {
109
107
return ptr:: null_mut ( ) ;
110
108
}
@@ -178,9 +176,8 @@ pub mod signal_macros {
178
176
/// `SIG_IGN` value into a function pointer in a `const` initializer, so
179
177
/// we make it a function instead.
180
178
///
181
- // TODO: In Rust 1.56 we can make this a `const fn`.
182
179
#[ inline]
183
- pub fn sig_ign ( ) -> super :: general:: __kernel_sighandler_t {
180
+ pub const fn sig_ign ( ) -> super :: general:: __kernel_sighandler_t {
184
181
// Safety: This creates an invalid pointer, but the pointer type
185
182
// includes `unsafe`, which covers the safety of calling it.
186
183
Some ( unsafe {
You can’t perform that action at this time.
0 commit comments