diff options
| author | Vivian Lim <[email protected]> | 2021-02-05 23:08:32 -0800 |
|---|---|---|
| committer | Vivian Lim <[email protected]> | 2021-02-05 23:08:32 -0800 |
| commit | 075cfe977ced20adb17732685b2deeccc1a207db (patch) | |
| tree | 2a190569c08d38e0e6f304e7258e44464135bb08 | |
| parent | local changes (diff) | |
| download | ctru-rs-075cfe977ced20adb17732685b2deeccc1a207db.tar.xz ctru-rs-075cfe977ced20adb17732685b2deeccc1a207db.zip | |
changes so that this can build
| -rw-r--r-- | ctru-rs/src/lib.rs | 1 | ||||
| -rw-r--r-- | ctru-rs/src/thread.rs | 6 | ||||
| -rw-r--r-- | ctru-sys/src/lib.rs | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/ctru-rs/src/lib.rs b/ctru-rs/src/lib.rs index a5c2321..c1c6eae 100644 --- a/ctru-rs/src/lib.rs +++ b/ctru-rs/src/lib.rs @@ -1,7 +1,6 @@ #![crate_type = "rlib"] #![crate_name = "ctru"] -#![feature(fnbox)] #![feature(rustc_private)] #[macro_use] diff --git a/ctru-rs/src/thread.rs b/ctru-rs/src/thread.rs index 4c4e23d..a194a3e 100644 --- a/ctru-rs/src/thread.rs +++ b/ctru-rs/src/thread.rs @@ -886,7 +886,7 @@ fn _assert_sync_and_send() { } mod imp { - use std::boxed::FnBox; + use std::boxed::Box; use std::cmp; use std::io; use std::mem; @@ -912,7 +912,7 @@ mod imp { stack: usize, priority: i32, affinity: i32, - p: Box<FnBox() + 'a>, + p: Box<dyn FnOnce() + 'a>, ) -> io::Result<Thread> { let p = Box::new(p); let stack_size = cmp::max(stack, DEFAULT_MIN_STACK_SIZE); @@ -961,7 +961,7 @@ mod imp { } unsafe fn _start_thread(main: *mut u8) { - Box::from_raw(main as *mut Box<FnBox()>)() + Box::from_raw(main as *mut Box<dyn FnOnce()>)() } pub fn yield_now() { diff --git a/ctru-sys/src/lib.rs b/ctru-sys/src/lib.rs index 81f3a12..2f92049 100644 --- a/ctru-sys/src/lib.rs +++ b/ctru-sys/src/lib.rs @@ -7,7 +7,7 @@ #![no_std] -#![cfg_attr(feature = "stdbuild", feature(libc))] +#![cfg_attr(feature = "build-std", feature(libc))] extern crate libc; |