]> git.lizzy.rs Git - rust.git/commitdiff
Rust unstable book: basic desc and example for `concat_idents`.
authorCorey Farwell <coreyf@rwell.org>
Sun, 12 Mar 2017 06:12:29 +0000 (01:12 -0500)
committerCorey Farwell <coreyf@rwell.org>
Tue, 14 Mar 2017 01:39:19 +0000 (21:39 -0400)
src/doc/unstable-book/src/concat-idents.md

index c9a48293dba684c2105ae6e83a77b047df5810b8..ecfd34a22e5ccbd39794a260879eb88317088e09 100644 (file)
@@ -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