From 627b9483fce6b50710eddbd59044f943c8605f12 Mon Sep 17 00:00:00 2001 From: Christian Meissl Date: Sun, 22 Sep 2024 17:13:49 +0200 Subject: [PATCH 1/2] bump MSRV to 1.78 --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- clippy.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d11a862d1e12..d3d9fa01b336 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - name: Rust toolchain - uses: dtolnay/rust-toolchain@1.72.0 + uses: dtolnay/rust-toolchain@1.78.0 - name: Get date for registry cache id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" diff --git a/Cargo.toml b/Cargo.toml index 80e3ce12cf9b..6075f1abef84 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" homepage = "https://smithay.github.io/" keywords = ["wayland", "compositor", "graphics", "server"] categories = ["gui"] -rust-version = "1.72.0" +rust-version = "1.78.0" [package.metadata.docs.rs] features = ["test_all_features"] diff --git a/clippy.toml b/clippy.toml index 7904b9c642d3..58cfc41184a7 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,4 +1,4 @@ -msrv = "1.72.0" +msrv = "1.78.0" type-complexity-threshold = 400 disallowed-macros = [ From b95f375a8a24e0fa2b872555138191e836c6a1b8 Mon Sep 17 00:00:00 2001 From: Christian Meissl Date: Sun, 22 Sep 2024 17:15:14 +0200 Subject: [PATCH 2/2] shm: fix static_mut_refs lint --- src/wayland/shm/pool.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wayland/shm/pool.rs b/src/wayland/shm/pool.rs index 36f71dfaaad5..c0c3a207310d 100644 --- a/src/wayland/shm/pool.rs +++ b/src/wayland/shm/pool.rs @@ -48,7 +48,7 @@ thread_local!(static SIGBUS_GUARD: Cell<(*const MemMap, bool)> = const { Cell::n /// SAFETY: /// This will be only set in the `SIGBUS_INIT` closure, hence only once! -static mut OLD_SIGBUS_HANDLER: Option = None; +static mut OLD_SIGBUS_HANDLER: libc::sigaction = unsafe { mem::zeroed() }; static SIGBUS_INIT: Once = Once::new(); #[derive(Debug)] @@ -313,7 +313,7 @@ unsafe fn place_sigbus_handler() { action.sa_sigaction = sigbus_handler as _; action.sa_flags = libc::SA_SIGINFO | libc::SA_NODEFER; - let old_action = OLD_SIGBUS_HANDLER.insert(mem::zeroed()); + let old_action = std::ptr::addr_of_mut!(OLD_SIGBUS_HANDLER); if libc::sigaction(libc::SIGBUS, &action, old_action) == -1 { let e = rustix::io::Errno::from_raw_os_error(errno::errno().0); panic!("sigaction failed for SIGBUS handler: {:?}", e); @@ -326,7 +326,7 @@ unsafe fn reraise_sigbus() { unsafe { libc::sigaction( libc::SIGBUS, - OLD_SIGBUS_HANDLER.as_ref().unwrap(), + std::ptr::addr_of_mut!(OLD_SIGBUS_HANDLER), ptr::null_mut(), ); libc::raise(libc::SIGBUS);