-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix indefinite article in cell.rs #79983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
This depends how you pronounce
&T
. I say "a reference type", but it sounds like the original author pronounced it "and-t".Git says the author was @alexcrichton (e5da6a7) - Alex, what do you think?
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.
That could be true...but couple of lines later you can see it being written the way i did it.
rust/library/core/src/cell.rs
Line 1552 in 2b9ba46
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.
And then below again, it uses
an
:rust/library/core/src/cell.rs
Line 1581 in 2b9ba46
I think either they should all be consistent (and probably this would need a tracking issue because there's so many places it's inconsistent now), or it's not worth changing. I don't think it makes sense to just change this one article.
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.
If you create an issue, I can go for it.
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.
Sounds good, but we should decide whether to use 'a' or 'an' first. @steveklabnik do you have an opinion?
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 indeed pronounce this "and-t" and "and-mute-t", but I do not have an opinion on whether it's right or not.
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.
Yeah it's tricky because it technically depends on how you pronounce it. I do what @alexcrichton does most of the time, though often "amp" and not "and," not that that changes the rules here.
https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md is the canonical reference for how we word things. It does not directly address this issue, though it does contain the phrase "an
&str
," probably because of "string slice" rather than&T
whereT
=str
."words are hard.
Uh oh!
There was an error while loading. Please reload this page.
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 honestly couldn't imagine how you are pronouncing this and it being correct.
Sorry but can you write out the an exact phrase? The only thing I have in my head is
an reference type
andan mutable reference type
which are obviously wrong.