]>
Commit | Line | Data |
---|---|---|
c620b35d | 1 | //@ compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes |
923072b8 FG |
2 | |
3 | #![crate_type = "lib"] | |
4 | ||
5 | use std::cell::{Ref, RefCell, RefMut}; | |
6 | ||
7 | // Make sure that none of the arguments get a `noalias` attribute, because | |
8 | // the `RefCell` might alias writes after either `Ref`/`RefMut` is dropped. | |
9 | ||
10 | // CHECK-LABEL: @maybe_aliased( | |
11 | // CHECK-NOT: noalias | |
12 | // CHECK-SAME: %_refcell | |
13 | #[no_mangle] | |
14 | pub unsafe fn maybe_aliased(_: Ref<'_, i32>, _: RefMut<'_, i32>, _refcell: &RefCell<i32>) {} |