1 // compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes
5 use std::sync::{RwLock, RwLockReadGuard};
7 // Make sure that `RwLockReadGuard` does not get a `noalias` attribute, because
8 // the `RwLock` might alias writes after it is dropped.
10 // CHECK-LABEL: @maybe_aliased(
14 pub unsafe fn maybe_aliased(_: RwLockReadGuard<'_, i32>, _data: &RwLock<i32>) {}