Skip to content

Commit 8538c53

Browse files
authored
Rollup merge of #127733 - GrigorenkoPV:don't-forget, r=Amanieu
Replace some `mem::forget`'s with `ManuallyDrop` > but I would like to see a larger effort to replace all uses of `mem::forget`. _Originally posted by `@saethlin` in rust-lang/rust#127584 (comment) So, r? `@saethlin` Sorry, I have finished writing all of this before I got your response.
2 parents 59cb199 + 0363f0f commit 8538c53

3 files changed

+3
-3
lines changed

tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _
1010
error: deadlock: the evaluated program deadlocked
1111
--> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC
1212
|
13-
LL | let ret = libc::pthread_join(self.id, ptr::null_mut());
13+
LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) };
1414
| ^ the evaluated program deadlocked
1515
|
1616
= note: BACKTRACE:

tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mu
1010
error: deadlock: the evaluated program deadlocked
1111
--> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC
1212
|
13-
LL | let ret = libc::pthread_join(self.id, ptr::null_mut());
13+
LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) };
1414
| ^ the evaluated program deadlocked
1515
|
1616
= note: BACKTRACE:

tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mu
1010
error: deadlock: the evaluated program deadlocked
1111
--> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC
1212
|
13-
LL | let ret = libc::pthread_join(self.id, ptr::null_mut());
13+
LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) };
1414
| ^ the evaluated program deadlocked
1515
|
1616
= note: BACKTRACE:

0 commit comments

Comments
 (0)