]>
git.proxmox.com Git - rustc.git/blob - src/test/run-pass/issues/issue-49955-2.rs
2 // compile-flags: -Z borrowck=mir
6 const FIVE
: Cell
<i32> = Cell
::new(5);
9 fn tuple_field() -> &'
static u32 {
10 // This test is MIR-borrowck-only because the old borrowck
11 // doesn't agree that borrows of "frozen" (i.e., without any
12 // interior mutability) fields of non-frozen temporaries,
13 // should be promoted, while MIR promotion does promote them.
18 assert_eq
!(tuple_field().to_string(), "42");