diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-03-12 01:12:29 -0500 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2017-03-13 21:39:19 -0400 |
| commit | d3ae2eb58ea2f96aa52b53d9171111b176b611eb (patch) | |
| tree | 3a3c01e9ee1ae144a74cde01c9b286c17c4706b1 /src/doc | |
| parent | e58e3d0bc0495a5103527d4c0317f089684ac0f1 (diff) | |
| download | rust-d3ae2eb58ea2f96aa52b53d9171111b176b611eb.tar.gz rust-d3ae2eb58ea2f96aa52b53d9171111b176b611eb.zip | |
Rust unstable book: basic desc and example for `concat_idents`.
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/unstable-book/src/concat-idents.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/concat-idents.md b/src/doc/unstable-book/src/concat-idents.md index c9a48293dba..ecfd34a22e5 100644 --- a/src/doc/unstable-book/src/concat-idents.md +++ b/src/doc/unstable-book/src/concat-idents.md @@ -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); +} +``` \ No newline at end of file |
