Skip to content

Commit

Permalink
trivial: Update rust, deps, fix lints.
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Cross <[email protected]>
  • Loading branch information
Dan Cross authored and gmacd committed Oct 15, 2024
1 parent 79e0160 commit 0cda5c2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions port/src/mcslock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,21 @@ pub struct LockGuard<'a, T: ?Sized + 'a> {
node: &'a LockNode,
data: &'a mut T,
}
impl<'a, T> Deref for LockGuard<'a, T> {
impl<T> Deref for LockGuard<'_, T> {
type Target = T;

fn deref(&self) -> &T {
self.data
}
}

impl<'a, T> DerefMut for LockGuard<'a, T> {
impl<T> DerefMut for LockGuard<'_, T> {
fn deref_mut(&mut self) -> &mut T {
self.data
}
}

impl<'a, T: ?Sized> Drop for LockGuard<'a, T> {
impl<T: ?Sized> Drop for LockGuard<'_, T> {
fn drop(&mut self) {
unsafe { &mut *self.lock.get() }.unlock(self.node);
}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions x86_64/src/proc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use core::arch::asm;
use core::arch::naked_asm;

#[repr(C)]
pub struct Label {
Expand All @@ -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)
Expand All @@ -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)
);
}
}

0 comments on commit 0cda5c2

Please sign in to comment.