1 //! Library used by tidy and other tools.
3 //! This library contains the tidy lints and exposes it
4 //! to be used by tools.
6 /// A helper macro to `unwrap` a result except also print out details like:
8 /// * The expression that failed
10 /// * (optionally) a path connected to the error (e.g. failure to open a file)
13 ($e:expr, $p:expr) => {
16 Err(e) => panic!("{} failed on {} with {}", stringify!($e), ($p).display(), e),
23 Err(e) => panic!("{} failed with {}", stringify!($e), e),
28 macro_rules! tidy_error {
29 ($bad:expr, $fmt:expr) => ({
31 eprint!("tidy error: ");
34 ($bad:expr, $fmt:expr, $($arg:tt)*) => ({
36 eprint!("tidy error: ");
37 eprintln!($fmt, $($arg)*);
42 pub mod debug_artifacts;
45 pub mod error_codes_check;
50 pub mod primitive_docs;
52 pub mod target_specific_tests;
55 pub mod unstable_book;