mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
Rust unstable book: basic desc and example for concat_idents.
This commit is contained in:
@@ -6,5 +6,17 @@ The tracking issue for this feature is: [#29599]
|
||||
|
||||
------------------------
|
||||
|
||||
The `concat_idents` feature adds a macro for concatenating multiple identifiers
|
||||
into one identifier.
|
||||
|
||||
## Examples
|
||||
|
||||
```rust
|
||||
#![feature(concat_idents)]
|
||||
|
||||
fn main() {
|
||||
fn foobar() -> u32 { 23 }
|
||||
let f = concat_idents!(foo, bar);
|
||||
assert_eq!(f(), 23);
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user