macro compile_fail($reason, $args/* ... */) { ... }

Causes the compilation to fail if reached.

This is useful when conditional compilation is used with #[cfg(...)] attributes, but it can also be used in generic context (e.g. with when expressions).

Can accept format arguments, which are formatted using the same syntax as std::fmt::format_args!. For obvious reasons, they must be const-evaluable.

Examples