Update to new Rust toolchain

This commit is contained in:
Jeremy Soller
2023-02-11 13:45:07 -07:00
parent a37916101f
commit 0bd476d28a
4 changed files with 12 additions and 7 deletions
-1
View File
@@ -1 +0,0 @@
nightly-2022-03-18
+3
View File
@@ -0,0 +1,3 @@
[toolchain]
channel = "nightly-2023-01-21"
components = ["rust-src"]
+4 -1
View File
@@ -2,6 +2,7 @@
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(unused_variables)]
#![feature(alloc_error_handler)]
#![feature(allocator_api)]
#![feature(array_chunks)]
#![feature(asm_const)]
@@ -19,6 +20,8 @@
#![allow(clippy::derive_hash_xor_eq)]
#![allow(clippy::eval_order_dependence)]
#![allow(clippy::mut_from_ref)]
// TODO: fix these
#![warn(unaligned_references)]
#[macro_use]
extern crate alloc;
@@ -87,7 +90,7 @@ pub extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
pub extern "C" fn rust_eh_personality() {}
#[cfg(not(test))]
#[lang = "oom"]
#[alloc_error_handler]
#[linkage = "weak"]
#[no_mangle]
pub extern "C" fn rust_oom(layout: ::core::alloc::Layout) -> ! {
+5 -5
View File
@@ -384,7 +384,7 @@ pub unsafe extern "C" fn pte_osSemaphoreCancellablePend(
#[no_mangle]
pub unsafe extern "C" fn pte_osAtomicExchange(ptarg: *mut c_int, val: c_int) -> c_int {
intrinsics::atomic_xchg(ptarg, val)
intrinsics::atomic_xchg_seqcst(ptarg, val)
}
#[no_mangle]
@@ -393,22 +393,22 @@ pub unsafe extern "C" fn pte_osAtomicCompareExchange(
exchange: c_int,
comp: c_int,
) -> c_int {
intrinsics::atomic_cxchg(pdest, comp, exchange).0
intrinsics::atomic_cxchg_seqcst_seqcst(pdest, comp, exchange).0
}
#[no_mangle]
pub unsafe extern "C" fn pte_osAtomicExchangeAdd(pAppend: *mut c_int, value: c_int) -> c_int {
intrinsics::atomic_xadd(pAppend, value)
intrinsics::atomic_xadd_seqcst(pAppend, value)
}
#[no_mangle]
pub unsafe extern "C" fn pte_osAtomicDecrement(pdest: *mut c_int) -> c_int {
intrinsics::atomic_xadd(pdest, -1) - 1
intrinsics::atomic_xadd_seqcst(pdest, -1) - 1
}
#[no_mangle]
pub unsafe extern "C" fn pte_osAtomicIncrement(pdest: *mut c_int) -> c_int {
intrinsics::atomic_xadd(pdest, 1) + 1
intrinsics::atomic_xadd_seqcst(pdest, 1) + 1
}
#[no_mangle]