]> git.proxmox.com Git - rustc.git/blame - tests/codegen/noalias-refcell.rs
bump version to 1.79.0+dfsg1-1~bpo12+pve2
[rustc.git] / tests / codegen / noalias-refcell.rs
CommitLineData
c620b35d 1//@ compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes
923072b8
FG
2
3#![crate_type = "lib"]
4
5use 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]
14pub unsafe fn maybe_aliased(_: Ref<'_, i32>, _: RefMut<'_, i32>, _refcell: &RefCell<i32>) {}