Skip to content

Commit abd41b5

Browse files
authored
Merge pull request RustPython#3383 from DimitrisJim/silence_wasi_warnings
Fix warnings for wasi check.
2 parents a19e876 + a377151 commit abd41b5

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

src/shell/helper.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg_attr(target_os = "wasi", allow(dead_code))]
12
use rustpython_vm::builtins::{PyDictRef, PyStrRef};
23
use rustpython_vm::VirtualMachine;
34
use rustpython_vm::{function::ArgIterable, PyResult, TryFromObject};

vm/src/exceptions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,12 +960,14 @@ impl<C: widestring::UChar> IntoPyException for widestring::NulError<C> {
960960

961961
pub(super) mod types {
962962
use crate::common::lock::PyRwLock;
963+
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
963964
use crate::{
964965
builtins::{traceback::PyTracebackRef, PyInt, PyTupleRef, PyTypeRef},
965966
function::{FuncArgs, IntoPyResult},
966967
PyObjectRef, PyRef, PyResult, VirtualMachine,
967968
};
968969
use crossbeam_utils::atomic::AtomicCell;
970+
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
969971
use std::ops::Deref;
970972

971973
// This module is designed to be used as `use builtins::*;`.

vm/src/signal.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg_attr(target_os = "wasi", allow(dead_code))]
12
use crate::{PyObjectRef, PyResult, VirtualMachine};
23
use std::sync::atomic::{AtomicBool, Ordering};
34

vm/src/stdlib/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Implementation of the _thread module
2-
2+
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
33
pub(crate) use _thread::{make_module, RawRMutex};
44

55
#[pymodule]

0 commit comments

Comments
 (0)