Skip to content

Commit b86be12

Browse files
committed
Auto merge of #95760 - Dylan-DPC:rollup-uskzggh, r=Dylan-DPC
Rollup of 4 pull requests Successful merges: - #95189 (Stop flagging unexpected inner attributes as outer ones in certain diagnostics) - #95752 (Regression test for #82866) - #95753 (Correct safety reasoning in `str::make_ascii_{lower,upper}case()`) - #95757 (Use gender neutral terms) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents c5e6de2 + 78dc109 commit b86be12

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/src/str/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2406,7 +2406,7 @@ impl str {
24062406
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
24072407
#[inline]
24082408
pub fn make_ascii_uppercase(&mut self) {
2409-
// SAFETY: safe because we transmute two types with the same layout.
2409+
// SAFETY: changing ASCII letters only does not invalidate UTF-8.
24102410
let me = unsafe { self.as_bytes_mut() };
24112411
me.make_ascii_uppercase()
24122412
}
@@ -2433,7 +2433,7 @@ impl str {
24332433
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
24342434
#[inline]
24352435
pub fn make_ascii_lowercase(&mut self) {
2436-
// SAFETY: safe because we transmute two types with the same layout.
2436+
// SAFETY: changing ASCII letters only does not invalidate UTF-8.
24372437
let me = unsafe { self.as_bytes_mut() };
24382438
me.make_ascii_lowercase()
24392439
}

std/src/fs/tests.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -644,9 +644,9 @@ fn recursive_rmdir_toctou() {
644644
// Test for time-of-check to time-of-use issues.
645645
//
646646
// Scenario:
647-
// The attacker wants to get directory contents deleted, to which he does not have access.
648-
// He has a way to get a privileged Rust binary call `std::fs::remove_dir_all()` on a
649-
// directory he controls, e.g. in his home directory.
647+
// The attacker wants to get directory contents deleted, to which they do not have access.
648+
// They have a way to get a privileged Rust binary call `std::fs::remove_dir_all()` on a
649+
// directory they control, e.g. in their home directory.
650650
//
651651
// The POC sets up the `attack_dest/attack_file` which the attacker wants to have deleted.
652652
// The attacker repeatedly creates a directory and replaces it with a symlink from

std/src/thread/local.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ pub mod fast {
980980
unsafe fn try_initialize<F: FnOnce() -> T>(&self, init: F) -> Option<&'static T> {
981981
// SAFETY: See comment above (this function doc).
982982
if !mem::needs_drop::<T>() || unsafe { self.try_register_dtor() } {
983-
// SAFETY: See comment above (his function doc).
983+
// SAFETY: See comment above (this function doc).
984984
Some(unsafe { self.inner.initialize(init) })
985985
} else {
986986
None

0 commit comments

Comments
 (0)