Merge pull request #3383 from DimitrisJim/silence_wasi_warnings

Fix warnings for wasi check.
This commit is contained in:
Jeong YunWon
2021-10-30 15:35:35 +09:00
committed by GitHub
4 changed files with 5 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
#![cfg_attr(target_os = "wasi", allow(dead_code))]
use rustpython_vm::builtins::{PyDictRef, PyStrRef};
use rustpython_vm::VirtualMachine;
use rustpython_vm::{function::ArgIterable, PyResult, TryFromObject};

View File

@@ -960,12 +960,14 @@ impl<C: widestring::UChar> IntoPyException for widestring::NulError<C> {
pub(super) mod types {
use crate::common::lock::PyRwLock;
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
use crate::{
builtins::{traceback::PyTracebackRef, PyInt, PyTupleRef, PyTypeRef},
function::{FuncArgs, IntoPyResult},
PyObjectRef, PyRef, PyResult, VirtualMachine,
};
use crossbeam_utils::atomic::AtomicCell;
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
use std::ops::Deref;
// This module is designed to be used as `use builtins::*;`.

View File

@@ -1,3 +1,4 @@
#![cfg_attr(target_os = "wasi", allow(dead_code))]
use crate::{PyObjectRef, PyResult, VirtualMachine};
use std::sync::atomic::{AtomicBool, Ordering};

View File

@@ -1,5 +1,5 @@
//! Implementation of the _thread module
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
pub(crate) use _thread::{make_module, RawRMutex};
#[pymodule]