Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
GuillaumeGomez
left a comment
There was a problem hiding this comment.
Just a little update to do and it'll be good.
There was a problem hiding this comment.
Copied this comment (capitalization, punctuation, spacing) from line 87 of the same file for consistency. The code sample comments in this file (lines 85, 87, and 237-238) are all lower case and without periods (terminating ellipsis at line 237). Formatting is similar in other files, e.g. "mutability.md", "traits.md". Let me know.
There was a problem hiding this comment.
Yurk. Well, they shouldn't be. If you want you can fix them as well (in this PR or another, as you want).
There was a problem hiding this comment.
Would like to confirm as it will affect a bunch of files which are already fairly consistent in their current style.
Here are some examples:
benchmark-tests.md:113
- // note lack of;(could also use an explicitreturn)
+ // Note lack of;(could also use an explicitreturn).
casting-between-types.md:109
- let a = 300 as *const char; // a pointer to location 300
+ let a = 300 as *const char; // A pointer to location 300.
OR as a sentence with predicate:
+ let a = 300 as *const char; // 'a' is a pointer to location 300.
traits.md:422
- // can be called with T == i32
+ // Can be called with T == i32.
traits.md:479
- true // overrides the expected value of is_invalid()
+ true // Overrides the expected value of is_invalid().
choosing-your-guarantees.md:293-296
let guard = mutex.lock();
- // guard dereferences mutably to the inner type
+ // 'guard' dereferences mutably to the inner type.
There's only an empty stub here on the topic: http://aturon.github.io/style/comments.html#code-snippets
Nothing on the topic here: https://github.com/rust-lang-nursery/fmt-rfcs/blob/master/guide/guide.md
There was a problem hiding this comment.
Your proposed changes are far better and it's exactly what I meant.
|
Thanks! @bors: r+ rollup |
|
📌 Commit 635ed48 has been approved by |
Add error note to illegal code snippet Mark intentionally invalid code snippet in documentation as such with a comment. Similar comments used elsewhere in this file. r? @steveklabnik
Mark intentionally invalid code snippet in documentation as such with a comment. Similar comments used elsewhere in this file.
r? @steveklabnik