mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
cleanup false positive warnings in latest rustc
This commit is contained in:
parent
08cfe2d724
commit
cabfbde7f2
2 changed files with 2 additions and 0 deletions
|
|
@ -146,6 +146,7 @@ fn handle_irq(_irq_no: usize, arg: *mut usize) {
|
|||
|
||||
fn main() -> ! {
|
||||
let stack_size = 2 * 1024 * 1024;
|
||||
#[allow(unreachable_code)] // false positive
|
||||
claim_main_thread(move |main_thread_token| {
|
||||
std::thread::Builder::new()
|
||||
.stack_size(stack_size)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ pub fn claim_main_thread(f: impl FnOnce(MainThreadToken) -> Never + Send + 'stat
|
|||
let (send, recv) = mpsc::sync_channel(0);
|
||||
|
||||
// Call the closure on a fake main thread
|
||||
#[allow(unreachable_code)] // false positive
|
||||
let fake_main_thread = std::thread::Builder::new()
|
||||
.name("wrapped_main".into())
|
||||
.spawn(move || f(MainThreadToken(send)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue