From 1a3a5a26e3fdc08ce083556edacf627b684cc63e Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Sat, 19 Jan 2019 23:54:34 -0500 Subject: [PATCH] Fixed the library to use the new Rust 2018 module system. --- Cargo.toml | 1 + build.rs | 4 ++-- src/c/stddef.rs | 1 + src/lib.rs | 4 ---- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 80f6aac..d20c530 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://gitlab.com/CyberMages/Core/pact.git" documentation = "" keywords = ["c", "libc", "binding", "ffi", "pact", "nostd"] build = "build.rs" +edition = "2018" [features] diff --git a/build.rs b/build.rs index 91183ef..2ebf37d 100644 --- a/build.rs +++ b/build.rs @@ -189,12 +189,12 @@ fn compile_and_run(output_name: &str, src_files: &[PathBuf], args: &[PathBuf]) pub fn main() { + let _gen_file: PathBuf; let mut errno_file: PathBuf; - let mut gen_file: PathBuf; let mut gen_errno_file: PathBuf; errno_file = build_src_file(ERRNO_GENERATOR_FILENAME); - gen_file = build_output_file(ERRNO_GENERATOR_OUTPUT_FILENAME); + _gen_file = build_output_file(ERRNO_GENERATOR_OUTPUT_FILENAME); gen_errno_file = build_output_file(GENERATED_ERRNO_FILENAME); compile_and_run(ERRNO_GENERATOR_OUTPUT_FILENAME, diff --git a/src/c/stddef.rs b/src/c/stddef.rs index df10e22..17e033c 100644 --- a/src/c/stddef.rs +++ b/src/c/stddef.rs @@ -1,2 +1,3 @@ /// This defines the size_t type. +#[allow(non_camel_case_types)] pub type size_t = usize; diff --git a/src/lib.rs b/src/lib.rs index 7c5b3ff..72ee519 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,12 +12,8 @@ #[cfg(not(feature="use_std"))] extern crate core as std; -#[macro_use] extern crate scribe; - -#[macro_use] extern crate binding; - extern crate weave;