wrapping_macros Build Status Cargo

A macro for wrapping arithmetic.

Any code within a wrapping! { .. } block will be transformed as follows:

See this Internals thread for the motivation behind this crate.

Note: This crate uses internal compiler APIs, and so requires the Nightly version of Rust.

Cargo

Add this to your Cargo.toml:

toml wrapping_macros = "*"

Example

```rust

![feature(plugin)]

![plugin(wrapping_macros)]

fn main() { let mut sum = 0u8; for x in 0u8..50 { wrapping! { sum += x; } } } ```

Caveats