From e9bbb1d052bf829fa8509d2308ddb792e5e2b39d Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Tue, 15 Oct 2024 17:16:16 +0000 Subject: [PATCH] trivial: Update rust, deps, fix lints. Signed-off-by: Dan Cross --- Cargo.lock | 32 ++++++++++++++++---------------- port/src/mcslock.rs | 6 +++--- rust-toolchain.toml | 2 +- x86_64/src/proc.rs | 6 +++--- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ef1e33..ea85257 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aarch64" @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.18" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.18" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -129,7 +129,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -152,9 +152,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" @@ -164,9 +164,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown", @@ -201,7 +201,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -213,9 +213,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -262,7 +262,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -293,9 +293,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", diff --git a/port/src/mcslock.rs b/port/src/mcslock.rs index 40da803..4faa458 100644 --- a/port/src/mcslock.rs +++ b/port/src/mcslock.rs @@ -105,7 +105,7 @@ pub struct LockGuard<'a, T: ?Sized + 'a> { node: &'a LockNode, data: &'a mut T, } -impl<'a, T> Deref for LockGuard<'a, T> { +impl Deref for LockGuard<'_, T> { type Target = T; fn deref(&self) -> &T { @@ -113,13 +113,13 @@ impl<'a, T> Deref for LockGuard<'a, T> { } } -impl<'a, T> DerefMut for LockGuard<'a, T> { +impl DerefMut for LockGuard<'_, T> { fn deref_mut(&mut self) -> &mut T { self.data } } -impl<'a, T: ?Sized> Drop for LockGuard<'a, T> { +impl Drop for LockGuard<'_, T> { fn drop(&mut self) { unsafe { &mut *self.lock.get() }.unlock(self.node); } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 849533d..c41b3c1 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2024-09-27" +channel = "nightly-2024-10-15" components = [ "rustfmt", "rust-src", "clippy", "llvm-tools" ] targets = [ "aarch64-unknown-none", diff --git a/x86_64/src/proc.rs b/x86_64/src/proc.rs index 6d5d204..4a58785 100644 --- a/x86_64/src/proc.rs +++ b/x86_64/src/proc.rs @@ -1,4 +1,4 @@ -use core::arch::asm; +use core::arch::naked_asm; #[repr(C)] pub struct Label { @@ -21,7 +21,7 @@ impl Label { #[naked] pub unsafe extern "C" fn swtch(save: &mut Label, next: &mut Label) { unsafe { - asm!( + naked_asm!( r#" movq (%rsp), %rax movq %rax, 0(%rdi) @@ -44,7 +44,7 @@ pub unsafe extern "C" fn swtch(save: &mut Label, next: &mut Label) { movq %rax, (%rsp) xorl %eax, %eax ret"#, - options(att_syntax, noreturn) + options(att_syntax) ); } }