Allow unused imports for cargo test

This commit is contained in:
Philipp Oppermann
2018-06-14 08:13:51 +02:00
parent 76ff956eb9
commit 2ed8d94c67
5 changed files with 9 additions and 11 deletions

View File

@@ -2,13 +2,13 @@
#![feature(const_fn)]
#![no_std] // don't link the Rust standard library
#![cfg_attr(not(test), no_main)] // disable all Rust-level entry points
#![cfg_attr(test, allow(dead_code, unused_macros, unused_imports))]
// add the library as dependency (same crate name as executable)
#[macro_use]
extern crate blog_os;
use blog_os::exit_qemu;
#[cfg(not(test))]
use core::panic::PanicInfo;
/// This function is the entry point, since the linker looks for a function

View File

@@ -2,12 +2,12 @@
#![feature(const_fn)]
#![no_std]
#![cfg_attr(not(test), no_main)]
#![cfg_attr(test, allow(dead_code, unused_macros, unused_imports))]
#[macro_use]
extern crate blog_os;
use blog_os::exit_qemu;
#[cfg(not(test))]
use core::panic::PanicInfo;
#[cfg(not(test))]

View File

@@ -1,12 +1,11 @@
#![feature(panic_implementation)] // required for defining the panic handler
#![no_std] // don't link the Rust standard library
#![cfg_attr(not(test), no_main)] // disable all Rust-level entry points
#![cfg_attr(test, allow(dead_code, unused_macros))] // allow unused code in test mode
#![cfg_attr(test, allow(dead_code, unused_macros, unused_imports))]
#[macro_use]
extern crate blog_os;
#[cfg(not(test))]
use core::panic::PanicInfo;
/// This function is the entry point, since the linker looks for a function