Update example usage

This commit is contained in:
Alex Crichton 2019-06-21 09:45:26 -07:00
parent 416d240b1e
commit cb89f6a131
2 changed files with 2 additions and 8 deletions

View File

@ -16,10 +16,7 @@ cfg-if = "0.1"
## Example
```rust
#[macro_use]
extern crate cfg_if;
cfg_if! {
cfg_if::cfg_if! {
if #[cfg(unix)] {
fn foo() { /* unix specific functionality */ }
} else if #[cfg(target_pointer_width = "32")] {

View File

@ -10,10 +10,7 @@
//! # Example
//!
//! ```
//! #[macro_use]
//! extern crate cfg_if;
//!
//! cfg_if! {
//! cfg_if::cfg_if! {
//! if #[cfg(unix)] {
//! fn foo() { /* unix specific functionality */ }
//! } else if #[cfg(target_pointer_width = "32")] {