]>
git.proxmox.com Git - rustc.git/blob - src/test/codegen/noalias-refcell.rs
1 // compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes
5 use std
::cell
::{Ref, RefCell, RefMut}
;
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.
10 // CHECK-LABEL: @maybe_aliased(
12 // CHECK-SAME: %_refcell
14 pub unsafe fn maybe_aliased(_
: Ref
<'_
, i32>, _
: RefMut
<'_
, i32>, _refcell
: &RefCell
<i32>) {}