#![cfg_attr(
not(test_no_submacro),
doc = r#"
The macro can be used to declare items or expression.
It can also be usefull to declare macro for pattern you often use.
For example, if we want to declare functions const from rust 1.31 which
introduced the concept:
```
# #[macro_use] extern crate if_rust_version;
# fn main() {
if_rust_version! { >= 1.31 {
// just a identity macro that forward the item
macro_rules! const_fn { ($f:item) => { $f } }
} else {
// remove the 'const'
macro_rules! const_fn {
($(#[$m:meta])* const fn $($rest:tt)*) => { $(#[$m])* fn $($rest)* };
($(#[$m:meta])* pub const fn $($rest:tt)*) => {
$(#[$m])*
/// This function is a const fn from rust 1.31
pub fn $($rest)*
};
}
}}
const_fn!{
/// This function is const chen the compiler supports it
pub const fn hello(x : u32) -> u32 { x + 2 }
}
# }
```
"#
)]
#![no_std]
include!(concat!(env!("OUT_DIR"), "/generated.rs"));