-
Notifications
You must be signed in to change notification settings - Fork 13.7k
libstd/libcore: fix various typos #74141
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
src/libcore/macros/mod.rs
Outdated
@@ -1044,7 +1044,7 @@ pub(crate) mod builtin { | |||
}; | |||
} | |||
|
|||
/// Includes a utf8-encoded file as a string. | |||
/// Includes a UTF-8-encoded file as a string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Includes a UTF-8-encoded file as a string. | |
/// Includes a UTF-8 encoded file as a string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix, but I'm curious: can you point me towards a grammar reference that indicates that this is the right choice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a grammar fix, just a readability fix. I never seen UTF-8 and encoded joined together in my life. I also find multiple -
in a paragraph hard to read. Looking at wikipedia, I can find both versions there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So like, the -
wasn't even strictly necessary in the first place. For one example of a resource talking about this, see https://apastyle.apa.org/learn/faqs/when-use-hyphen
Basically all of these rules are about clarity. Does the hypen disambiguate, or not? I would argue that it's quite clear without the hyphen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I should note that I particularly over-use the hypen (oh my I just did it again in this sentence) so this is very much often my fault in Rust docs, though I didn't author this one...)
Did you go through this with some kind of type checkers like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the one suggestion already made, but otherwise, looks great to me! r=me after that's fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I made a super hacky custom rustdoc pass that ran a spellchecker over markdown compiled to plain text. |
@bors r=@steveklabnik rollup=always |
📌 Commit 133e91d has been approved by |
Do you mind sharing? That sounds useful :) |
…arth Rollup of 8 pull requests Successful merges: - rust-lang#74141 (libstd/libcore: fix various typos) - rust-lang#74490 (add a Backtrace::disabled function) - rust-lang#74548 (one more Path::with_extension example, to demonstrate behavior) - rust-lang#74587 (Prefer constant over function) - rust-lang#74606 (Remove Linux workarounds for missing CLOEXEC support) - rust-lang#74637 (Make str point to primitive page) - rust-lang#74654 (require type defaults to be after const generic parameters) - rust-lang#74659 (Improve codegen for unchecked float casts on wasm) Failed merges: r? @ghost
How do you all find https://github.com/drahnr/cargo-spellcheck? Is it useful? @euclio @jyn514 Do you think it would be good if we integrate that into tidy? |
It has a dependency on autotools and |
And it also doesn't work:
|
Yeah, I'm not surprised @jyn514 The master branch shouldn't have a dependency on autotools anymore. It was getting that from hunspell-sys (which I maintain) and we recently moved the build over to |
No description provided.