Document association of generic arguments in path segments
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- rust
调研方向
首先比较 issue 中的两个枚举变体表达式,以及 Rust Reference PR 2165 提议的泛型参数相关内容和相关的 Rust PR 154971。确定这些形式是否等价,并识别其他路径段情况;完成的标准是在 Reference 中记录已确认的关联规则和示例。
由索引模型根据 Issue 内容生成。
描述
There are some subtle behaviors around where generic arguments can appear in a path, particularly with enum variants. For example:
enum E<T> {
V1 { x: T },
}
fn main() {
// These seem to be the same.
E::V1::<i32> { x: 1 };
E::<i32>::V1 { x: 1 };
}
Are these exactly the same? I'm wondering if there are other oddities like this? This came up when looking at https://github.com/rust-lang/rust/pull/154971.
https://github.com/rust-lang/reference/pull/2165 is adding more documentation on generic arguments and how they are associated, but I don't think it covers this.
- 主要语言
- Rust
- 星标
- 1.6k
- 派生
- 614
- 平均合并
- 20 小时 25 分钟
- 30 天内合并 PR
- 9
环境准备
- 没有 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
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 3 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
-
Zellij doesn't validate hex colors correctly and crashes可能已有人在做 @ymcx 今天认领。 未关闭suspected bug
难度 2/5 1-3 小时 新手友好度 76/100
zellij-org/zellij#5732 ·
维护者通常 1 天内回复
-
bug(api): E_DOSE_ATTR_NONFINITE for a modeled D/R still says the value "never reaches you as a NaN"未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 63/100