-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Switch to gender neutral terms #95508
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -454,7 +454,7 @@ impl str { | |
/// assert!(v.get_mut(0..5).is_some()); | ||
/// // out of bounds | ||
/// assert!(v.get_mut(..42).is_none()); | ||
/// assert_eq!(Some("he"), v.get_mut(0..2).map(|v| &*v)); | ||
/// assert_eq!(Some("they"), v.get_mut(0..2).map(|v| &*v)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello, @jamiepinheiro Your bot is busted. "he" is used here not as a pronoun but as a random two-character string. |
||
/// | ||
/// assert_eq!("hello", v); | ||
/// { | ||
|
@@ -463,7 +463,7 @@ impl str { | |
/// s.make_ascii_uppercase(); | ||
/// &*s | ||
/// }); | ||
/// assert_eq!(Some("HE"), s); | ||
/// assert_eq!(Some("THEY"), s); | ||
/// } | ||
/// assert_eq!("HEllo", v); | ||
/// ``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -644,9 +644,9 @@ fn recursive_rmdir_toctou() { | |
// Test for time-of-check to time-of-use issues. | ||
// | ||
// Scenario: | ||
// The attacker wants to get directory contents deleted, to which he does not have access. | ||
// He has a way to get a privileged Rust binary call `std::fs::remove_dir_all()` on a | ||
// directory he controls, e.g. in his home directory. | ||
// The attacker wants to get directory contents deleted, to which they does not have access. | ||
// They has a way to get a privileged Rust binary call `std::fs::remove_dir_all()` on a | ||
// directory they controls, e.g. in their home directory. | ||
Comment on lines
+647
to
+649
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, "contribution" via regex, without human oversight, is not a good strategy. Pronouns are not context-free. It is "they do not have". I think this is the only legitimate example of something we might want to change, and it is still wrong and thus cannot be merged. |
||
// | ||
// The POC sets up the `attack_dest/attack_file` which the attacker wants to have deleted. | ||
// The attacker repeatedly creates a directory and replaces it with a symlink from | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -980,7 +980,7 @@ pub mod fast { | |
unsafe fn try_initialize<F: FnOnce() -> T>(&self, init: F) -> Option<&'static T> { | ||
// SAFETY: See comment above (this function doc). | ||
if !mem::needs_drop::<T>() || unsafe { self.try_register_dtor() } { | ||
// SAFETY: See comment above (his function doc). | ||
// SAFETY: See comment above (their function doc). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Many examples are just typos. |
||
Some(unsafe { self.inner.initialize(init) }) | ||
} else { | ||
None | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ pub struct Foo; | |
/// And then, the princess died. | ||
//~^ ERROR missing code example in this documentation | ||
pub mod foo { | ||
/// Or maybe not because she saved herself! | ||
/// Or maybe not because they saved herself! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Many examples would make it contextually incorrect e.g. when there is a discussion of a hypothetical entity who IS gendered. It would require a much more careful revision. |
||
//~^ ERROR missing code example in this documentation | ||
pub fn bar() {} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ pub enum MaybeDog { | |
|
||
impl MaybeDog { | ||
fn bark() { | ||
// If this provides a suggestion, it's a bug as MaybeDog doesn't impl Groom | ||
// If this provides a suggestion, it's a bug as MaybeDog doesn't impl Newlywed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Groom" has other meanings, as it is also a verb, amongst other things. |
||
shave(); | ||
//~^ ERROR cannot find function `shave` | ||
} | ||
|
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 don't think this will compile