[][src]Crate noship

Noship is a macro that acts similar to todo! but will throw a compilation error when compiled on release profile. Think of this as todo but the compiler will refuse to compile on release mode thus prohibit you to release incomplete code in case you forgot about it.

Example

This example is not tested
use noship::noship;

fn main() {
    noship!();
}

If you build the code example above on release profile, cargo build --release, the compiler will emit a compilation error.

error: release blocked
 --> src/main.rs
  |
  |     noship!();
  |     ^^^^^^^^^^
  |

On dev profile, omitting the release flag, it will compile just fine. But, similar to todo!, it will panic when you run it.

You can force noship to always behave like on dev profile by adding nonoship in the rustc cfg args, i.e. RUSTFLAGS='--cfg nonoship' cargo build --release

Macros

noship

Indicates unfinished code.