Improve unimpl! docs

This commit is contained in:
bjorn3 2019-03-03 11:02:32 +01:00
parent 23a9dcd947
commit e77f1185a1

View File

@ -14,8 +14,12 @@ thread_local! {
}
// Just public, because of the unimpl macro
#[doc(hidden)]
pub struct NonFatal(pub String);
/// Use when something in the current function is unimplemented.
///
/// This will emit an error and continue codegen at a different function.
pub macro unimpl($($tt:tt)*) {
panic!(NonFatal(format!($($tt)*)));
}