1 unstable release
Uses old Rust 2015
0.9.0 | Jan 31, 2020 |
---|
#413 in No standard library
9KB
93 lines
feature_macros
This crate allows for controling how safe/unsafe other crates are.
Example
This macro can (but should not necessarily) be used identically to
unreachable!
or panic!
.
match x {
Foo::Bar => bar(&x),
Foo::Baz => baz(&x),
_ => inconceivable!(),
}
Developer Controllable Options
ub_inconceivable
: This controls the semantics of theinconceivable!
macro. When this options is not supplied (or when this options is supplied, and the crate is compiled withrustc --version < 1.27
)inconceivable!
will simply aliasunreachable!
. When this option is supplied (and the crate is compiled withrustc --version >= 1.27
) this will instead emitunreachable_uncheck()
which is UB.
Developer Uncontrollable Options
RUSTC_VERSION_GE_1_27
: States ifrustc --version >= 1.27
this is used as a feature check.
No runtime deps
~20KB