diff --git a/compiler/rustc_error_codes/src/error_codes/E0118.md b/compiler/rustc_error_codes/src/error_codes/E0118.md index 8033aa8384c2e..4ab6c0ae6969e 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0118.md +++ b/compiler/rustc_error_codes/src/error_codes/E0118.md @@ -23,7 +23,7 @@ trait LiveLongAndProsper { // and now you can implement it on fn(u8) impl LiveLongAndProsper for fn(u8) { fn get_state(&self) -> String { - "He's dead, Jim!".to_owned() + "They's dead, Jim!".to_owned() } } ``` diff --git a/compiler/rustc_error_codes/src/error_codes/E0393.md b/compiler/rustc_error_codes/src/error_codes/E0393.md index 3e853cf1b8a36..0b727440b4a51 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0393.md +++ b/compiler/rustc_error_codes/src/error_codes/E0393.md @@ -5,7 +5,7 @@ Erroneous code example: ```compile_fail,E0393 trait A {} -fn together_we_will_rule_the_galaxy(son: &A) {} +fn together_we_will_rule_the_galaxy(child: &A) {} // error: the type parameter `T` must be explicitly specified in an // object type because its default value `Self` references the // type `Self` @@ -25,5 +25,5 @@ defaulted parameter will fix this issue. Fixed example: ``` trait A {} -fn together_we_will_rule_the_galaxy(son: &A) {} // Ok! +fn together_we_will_rule_the_galaxy(child: &A) {} // Ok! ``` diff --git a/compiler/rustc_error_codes/src/error_codes/E0560.md b/compiler/rustc_error_codes/src/error_codes/E0560.md index 7185bf38c233d..0e43f05bfe1bd 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0560.md +++ b/compiler/rustc_error_codes/src/error_codes/E0560.md @@ -4,20 +4,20 @@ Erroneous code example: ```compile_fail,E0560 struct Simba { - mother: u32, + parent: u32, } -let s = Simba { mother: 1, father: 0 }; -// error: structure `Simba` has no field named `father` +let s = Simba { parent: 1, parent: 0 }; +// error: structure `Simba` has no field named `parent` ``` Verify you didn't misspell the field's name or that the field exists. Example: ``` struct Simba { - mother: u32, - father: u32, + parent: u32, + parent: u32, } -let s = Simba { mother: 1, father: 0 }; // ok! +let s = Simba { parent: 1, parent: 0 }; // ok! ``` diff --git a/compiler/rustc_expand/src/mbe/macro_parser.rs b/compiler/rustc_expand/src/mbe/macro_parser.rs index 18302ffdb8e10..7beddc15aa740 100644 --- a/compiler/rustc_expand/src/mbe/macro_parser.rs +++ b/compiler/rustc_expand/src/mbe/macro_parser.rs @@ -294,7 +294,7 @@ pub(super) fn count_metavar_decls(matcher: &[TokenTree]) -> usize { /// only on the nesting depth of repetitions in the originating token tree it /// was derived from. /// -/// In layman's terms: `NamedMatch` will form a tree representing nested matches of a particular +/// In layperson's terms: `NamedMatch` will form a tree representing nested matches of a particular /// meta variable. For example, if we are matching the following macro against the following /// invocation... /// diff --git a/compiler/rustc_typeck/src/check/wfcheck.rs b/compiler/rustc_typeck/src/check/wfcheck.rs index 250576bff048f..4839aaa3010b5 100644 --- a/compiler/rustc_typeck/src/check/wfcheck.rs +++ b/compiler/rustc_typeck/src/check/wfcheck.rs @@ -1654,7 +1654,7 @@ fn receiver_is_valid<'fcx, 'tcx>( } } else { debug!("receiver_is_valid: type `{:?}` does not deref to `{:?}`", receiver_ty, self_ty); - // If he receiver already has errors reported due to it, consider it valid to avoid + // If they receiver already has errors reported due to it, consider it valid to avoid // unnecessary errors (#58712). return receiver_ty.references_error(); } diff --git a/compiler/rustc_typeck/src/collect.rs b/compiler/rustc_typeck/src/collect.rs index 3078eba9dc245..eff2bdf4d040d 100644 --- a/compiler/rustc_typeck/src/collect.rs +++ b/compiler/rustc_typeck/src/collect.rs @@ -2703,7 +2703,7 @@ fn linkage_by_name(tcx: TyCtxt<'_>, def_id: DefId, name: &str) -> Linkage { // Use the names from src/llvm/docs/LangRef.rst here. Most types are only // applicable to variable declarations and may not really make sense for // Rust code in the first place but allow them anyway and trust that the - // user knows what s/he's doing. Who knows, unanticipated use cases may pop + // user knows what s/they's doing. Who knows, unanticipated use cases may pop // up in the future. // // ghost, dllimport, dllexport and linkonce_odr_autohide are not supported diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 0b57c36247e43..27e1796d7db1b 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -225,7 +225,7 @@ //! // At the end of the function, `gadget_owner`, `gadget1`, and `gadget2` //! // are destroyed. There are now no strong (`Rc`) pointers to the //! // gadgets, so they are destroyed. This zeroes the reference count on -//! // Gadget Man, so he gets destroyed as well. +//! // Gadget Man, so they gets destroyed as well. //! } //! ``` //! diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 71b6b9b41f5c5..1a02e805f2ce8 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1193,7 +1193,7 @@ impl String { /// /// s.truncate(2); /// - /// assert_eq!("he", s); + /// assert_eq!("they", s); /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 77bf5f9dc34e3..135836c50949b 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -2244,7 +2244,7 @@ impl [T] { /// assert_eq!(v.strip_prefix(&[50]), None); /// assert_eq!(v.strip_prefix(&[10, 50]), None); /// - /// let prefix : &str = "he"; + /// let prefix : &str = "they"; /// assert_eq!(b"hello".strip_prefix(prefix.as_bytes()), /// Some(b"llo".as_ref())); /// ``` diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 6bfa6a5e01519..e9e8f8bbbdfc0 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -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)); /// /// 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); /// ``` diff --git a/library/std/src/collections/mod.rs b/library/std/src/collections/mod.rs index 0caec8fe05aa7..2d34a7e35ea75 100644 --- a/library/std/src/collections/mod.rs +++ b/library/std/src/collections/mod.rs @@ -296,7 +296,7 @@ //! use std::collections::btree_map::BTreeMap; //! //! let mut count = BTreeMap::new(); -//! let message = "she sells sea shells by the sea shore"; +//! let message = "they sells sea shells by the sea shore"; //! //! for c in message.chars() { //! *count.entry(c).or_insert(0) += 1; diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs index a68def1e83dbb..0770419d0dbf0 100644 --- a/library/std/src/ffi/c_str.rs +++ b/library/std/src/ffi/c_str.rs @@ -1337,7 +1337,7 @@ impl CStr { /// ``` /// use std::ffi::CStr; /// - /// let cstr = CStr::from_bytes_with_nul(b"he\0llo\0"); + /// let cstr = CStr::from_bytes_with_nul(b"they\0llo\0"); /// assert!(cstr.is_err()); /// ``` #[stable(feature = "cstr_from_bytes", since = "1.10.0")] diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 3fa731c952983..c5fd931a548b0 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -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. // // 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 diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs index ca29261b1c98d..7bf973ca0cdbb 100644 --- a/library/std/src/thread/local.rs +++ b/library/std/src/thread/local.rs @@ -980,7 +980,7 @@ pub mod fast { unsafe fn try_initialize T>(&self, init: F) -> Option<&'static T> { // SAFETY: See comment above (this function doc). if !mem::needs_drop::() || unsafe { self.try_register_dtor() } { - // SAFETY: See comment above (his function doc). + // SAFETY: See comment above (their function doc). Some(unsafe { self.inner.initialize(init) }) } else { None diff --git a/src/test/rustdoc-ui/doc-without-codeblock.rs b/src/test/rustdoc-ui/doc-without-codeblock.rs index 315fca195873a..7e5288168c84b 100644 --- a/src/test/rustdoc-ui/doc-without-codeblock.rs +++ b/src/test/rustdoc-ui/doc-without-codeblock.rs @@ -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! //~^ ERROR missing code example in this documentation pub fn bar() {} } diff --git a/src/test/ui/resolve/issue-2356.rs b/src/test/ui/resolve/issue-2356.rs index fe9bf4d443e72..a745250f098ba 100644 --- a/src/test/ui/resolve/issue-2356.rs +++ b/src/test/ui/resolve/issue-2356.rs @@ -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 shave(); //~^ ERROR cannot find function `shave` }