wow cool $crate hack thank you nemo

This commit is contained in:
nora 2022-09-13 13:11:26 +02:00
parent 20befd0a8f
commit 5b22878e81
3 changed files with 49 additions and 29 deletions

View file

@ -1,13 +1,18 @@
#![allow(dead_code)]
// for the test macro expansion
extern crate self as mono_fmt;
mod args;
mod opts;
mod write;
pub use mono_fmt_macro::format_args;
#[doc(hidden)]
pub use mono_fmt_macro::__format_args;
#[macro_export]
macro_rules! format_args {
($($tt:tt)*) => {
$crate::__format_args!($crate $($tt)*)
};
}
pub use crate::args::Arguments;
pub use crate::opts::FmtOpts;
@ -137,7 +142,6 @@ mod tests {
}
}
fn f() {
crate::format!("uwu, {f:_<?}", "what");
}
}