pub macro const_error($kind:expr, $message:expr $(,)?) {
...
}
🔬This is a nightly-only experimental API. (
io_const_error
#133448)Expand description
Creates a new I/O error from a known kind of error and a string literal.
Contrary to Error::new
, this macro does not allocate and can be used in
const
contexts.