Confusing unrelated code example in Implementations after items.impl.trait.safety #1751
Labels
Language Cleanup
Improvements to existing language which is correct but not clear, or missing examples, or the like.
Immediately after the section about unsafe trait impls, there's a seemingly unrelated code example showing what appears to be an implementation of standard and custom traits (none of which are
unsafe
).reference/src/items/implementations.md
Lines 125 to 159 in 6288200
I found it fairly confusing, because I was expecting that a code example immediately after an important remark like that would show an example of it, but it appears to be a simple demonstration of the common syntax.
Every other code block in this file follows my expectations of the code example elaborating on the previous rule, just this one code block appears completely unrelated to the rule before it.
reference/src/items/implementations.md
Lines 63 to 99 in 6288200
(The code example here shows multiple
impl
blocks)I would have expected the example code (the one with
Circle
) to be placed after theitems.impl.trait.intro
paragraph - would that make more sense? Otherwise, I think that the code block should at least be more clearly detached from theunsafe
rule, because it's not an example of an unsafe trait impl.The text was updated successfully, but these errors were encountered: