about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRobin Raymond <robin@robinraymond.de>2022-06-20 04:44:25 +0000
committerRobin Raymond <robin@robinraymond.de>2022-06-20 04:44:25 +0000
commit048a80140b82471b671e7ae17f6dce2bb604f473 (patch)
tree40f639bbf17a9bd0cbedc829b03b7ac03ed04a57 /src
parent43c6f9c6919ec377dff35ecfdd6d87b66c692920 (diff)
downloadrust-048a80140b82471b671e7ae17f6dce2bb604f473.tar.gz
rust-048a80140b82471b671e7ae17f6dce2bb604f473.zip
UnsafeCell -> RwLock
Diffstat (limited to 'src')
-rw-r--r--src/test/codegen/noalias-rwlockreadguard.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/codegen/noalias-rwlockreadguard.rs b/src/test/codegen/noalias-rwlockreadguard.rs
index f9a2cc759eb..7f7b46c85a8 100644
--- a/src/test/codegen/noalias-rwlockreadguard.rs
+++ b/src/test/codegen/noalias-rwlockreadguard.rs
@@ -2,14 +2,13 @@
 
 #![crate_type = "lib"]
 
-use std::cell::UnsafeCell;
-use std::sync::RwLockReadGuard;
+use std::sync::{RwLock, RwLockReadGuard};
 
 // Make sure that `RwLockReadGuard` does not get a `noalias` attribute, because
-// the `UnsafeCell` might alias writes after it is dropped.
+// the `RwLock` might alias writes after it is dropped.
 
 // CHECK-LABEL: @maybe_aliased(
 // CHECK-NOT: noalias
 // CHECK-SAME: %_data
 #[no_mangle]
-pub unsafe fn maybe_aliased(_: RwLockReadGuard<'_, i32>, _data: &UnsafeCell<i32>) {}
+pub unsafe fn maybe_aliased(_: RwLockReadGuard<'_, i32>, _data: &RwLock<i32>) {}