436: Add deny for unreachable patterns and unused unsafe r=syrusakbary a=bjfish



Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
This commit is contained in:
bors[bot] 2019-05-12 22:16:44 +00:00
commit b2227314a7
15 changed files with 17 additions and 18 deletions

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
mod cache;
mod func_env;

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
#[macro_use]
extern crate wasmer_runtime_core;

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
#![cfg_attr(nightly, feature(unwind_attributes))]
mod backend;

View File

@ -1,3 +1,3 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
pub mod call_trace;

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
#[cfg(not(target_os = "windows"))]
#[macro_use]

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
extern crate wasmer_runtime;
extern crate wasmer_runtime_core;

View File

@ -35,7 +35,6 @@ impl fmt::Debug for InternalEvent {
InternalEvent::Breakpoint(_) => write!(f, "Breakpoint"),
InternalEvent::SetInternal(_) => write!(f, "SetInternal"),
InternalEvent::GetInternal(_) => write!(f, "GetInternal"),
_ => panic!("unknown event"),
}
}
}

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
#![cfg_attr(nightly, feature(unwind_attributes))]
#[cfg(test)]

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
//! Wasmer-runtime is a library that makes embedding WebAssembly
//! in your application easy, efficient, and safe.

View File

@ -212,10 +212,10 @@ impl RunnableModule for X64ExecutionContext {
user_error: *mut Option<Box<dyn Any>>,
num_params_plus_one: Option<NonNull<c_void>>,
) -> bool {
let rm: &Box<dyn RunnableModule> = &unsafe { &*(*ctx).module }.runnable_module;
let execution_context = unsafe {
::std::mem::transmute_copy::<&dyn RunnableModule, &X64ExecutionContext>(&&**rm)
};
let rm: &Box<dyn RunnableModule> = &(&*(*ctx).module).runnable_module;
let execution_context =
::std::mem::transmute_copy::<&dyn RunnableModule, &X64ExecutionContext>(&&**rm);
let args = ::std::slice::from_raw_parts(
args,
num_params_plus_one.unwrap().as_ptr() as usize - 1,

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
#![feature(proc_macro_hygiene)]
#[cfg(not(any(

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
#[macro_use]
extern crate log;

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
#[cfg(windows)]
mod exception_handling;

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
extern crate structopt;

View File

@ -1,4 +1,4 @@
#![deny(unused_imports, unused_variables)]
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
#[macro_use]
extern crate wasmer_runtime_core;