adambard / adambard/learnxinyminutes-docs
[rust/en] clarify the difference between `impl<T> Foo<T>` and `impl Foo<T>`
Đang mở
quickfix
- Ngôn ngữ chính
- Markdown
- Star
- 12.3k
- Fork
- 3.7k
- Merge trung bình
- 13 giờ 10 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
This was confusing to me. At first glance, the first `T` just looks redundant because `Foo` is already
polymorphic. I'd add a note saying that the first `T` is necessary to indicate that `T` in `Foo` here
is not a concrete type, but a type parameter. Or, perhaps add an example where `T` is concrete, then `impl Foo` will get accepted.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.