More Rust updates:

- Some stray deriving -> derive changes
- use::{mod} -> use::{self}
- fmt.write -> fmt.write_str

This does not catch the last case of fmt.write_str in the
Show impl of a Header Item. This will need to be changed
separately.
This commit is contained in:
Jonathan Reem
2015-01-05 22:50:10 +01:00
parent 7f3a33f903
commit f0fe878ec8
31 changed files with 90 additions and 73 deletions

View File

@@ -1,4 +1,6 @@
#![feature(macro_rules, phase, default_type_params, slicing_syntax, globs)]
#![feature(macro_rules, phase, default_type_params,
slicing_syntax, globs, associated_types,
old_orphan_check)]
#![deny(missing_docs)]
#![deny(warnings)]
#![experimental]
@@ -158,21 +160,22 @@ macro_rules! todo(
})
);
#[allow(dead_code)]
struct Trace;
impl fmt::Show for Trace {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
let _ = backtrace::write(fmt);
Result::Ok(())
}
}
macro_rules! trace(
($($arg:tt)*) => (if cfg!(not(ndebug)) {
log!(5, "{}\n{}", format_args!($($arg)*), ::Trace)
})
);
// FIXME(reem): Uncomment this when backtrace::write can write to a fmt::Formatter.
// #[allow(dead_code)]
// struct Trace;
//
// impl fmt::Show for Trace {
// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
// let _ = backtrace::write(fmt);
// Result::Ok(())
// }
// }
//
// macro_rules! trace(
// ($($arg:tt)*) => (if cfg!(not(ndebug)) {
// log!(5, "{}\n{}", format_args!($($arg)*), ::Trace)
// })
// );
macro_rules! inspect(
($name:expr, $value:expr) => ({