cargo-expand 0.1.3

Wrapper around rustc --pretty=expanded. Shows the result of macro expansion and #[derive] expansion.
# cargo-expand

[![Build Status](](
[![Latest Version](](

This is a wrapper around `cargo rustc -- --pretty=expanded`. Once installed, the
command `cargo expand` prints out the result of macro expansion and `#[derive]`
expansion applied to the current crate.

## Installation

Install with `cargo install cargo-expand`.

This command optionally uses
to format the expanded output. If `rustfmt` is not available, the expanded code
is not formatted. Install `rustfmt` with `cargo install rustfmt`.

## Example

`$ cat src/`

> ```rust
fn main() {
    println!("Hello, world!");

`$ cargo expand`

> ```rust
use std::prelude::v1::*;
extern crate std as std;
fn main() {
                                                        static __STATIC_FMTSTR:
                                                               &'static [&'static str]
                                                            &["Hello, world!\n"];
                                                    &match () {
                                                        () => [],

Or to expand a particular test target:

`$ cargo expand --test test_something`

## License

Licensed under either of

 * Apache License, Version 2.0 ([LICENSE-APACHE]LICENSE-APACHE or

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in cargo-expand by you, as defined in the Apache-2.0 license,
shall be dual licensed as above, without any additional terms or conditions.