vagueness about "add additional attributes" in `macro.proc.derive.attributes`
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 65/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- rust
调研方向
首先定位 macro.proc.derive.attributes 部分,并阅读包含“add additional attributes into the scope.”的段落。明确说明 derive 宏的辅助属性可以在 item 的作用域中使用,而不是暗示对输入 TokenStream 进行修改;当措辞明确无歧义且避免了所指出的重复时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Derive macros can add additional attributes into the scope of the item they are on. Said attributes are called derive macro helper attributes. These attributes are inert, and their only purpose is to be fed into the derive macro that defined them. That said, they can be seen by all macros.
When it says a derive macro can "add additional attributes into the scope", it does not make it very clear that it allows these helper attributes to be used in the scope. Instead, the way it is worded suggests the derive macro can mutate its input TokenStream, which as far as I am aware is not the case. I believe derive macros are "pure"... with respect to their TokenStream, anyway.
...also "add additional" anything seems slightly repetitive, but that's relatively minor.
- 主要语言
- Rust
- 星标
- 1.6k
- 派生
- 609
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-lang/reference 的其他 Issue
-
A-const-eval A-undefined-behavior
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
rust-lang/reference#2266 · 1 条评论 ·
维护者通常 1 天内回复
-
A-resolve
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
A-coercions
难度 2/5 1-3 小时 新手友好度 65/100
rust-lang/reference#2094 · 1 条评论 ·
维护者通常 1 天内回复
查看 rust-lang/reference 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 95/100
维护者通常 1 天内回复
-
Markdown Preview Fonts Don't Show Selected Option可能已有人在做 @RadhiRasho 今天认领。 未关闭state:needs triage
难度 2/5 1-3 小时 新手友好度 61/100
zed-industries/zed#65300 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复