2
0
mirror of https://github.com/gnu4cn/rust-lang-zh_CN.git synced 2025-03-24 08:10:28 +08:00

Update Ch21

This commit is contained in:
Peng Hailin, 2023-04-08 14:20:51 +08:00
parent 0d8a4b6a94
commit 41d85c7a74

View File

@ -247,4 +247,17 @@ fn main() {
| `T: ?Sized` | 允许泛型参数为动态大小类型 |
| `'a + trait`, `trait + trait` | 复合的类型约束 |
下表 B-6 展示了出现在宏调用或定义上下文中,并指明了某个项目上属性的一些符号。
**<small>B-6宏与属性</small>**
| 符号 | 说明 |
| :--- | :--- |
| `#[meta]` | 外层属性 |
| `#![meta]` | 内层熟悉 |
| `$ident` | 宏代换macro substitution |
| `$ident:kind` | 宏捕获 |
| `$(...) ...` | 宏重复macro repetition |
| `ident! (...)`, `ident! {...}`, `ident! [...]` | 宏调用macro invocation |