2018-11-21 03:37:18 -06:00
|
|
|
use std::cell::Cell;
|
|
|
|
|
|
|
|
const FOO: &(Cell<usize>, bool) = {
|
|
|
|
let mut a = (Cell::new(0), false);
|
2018-11-21 04:47:16 -06:00
|
|
|
a.1 = true; // sets `qualif(a)` to `qualif(a) | qualif(true)`
|
2021-01-03 07:45:16 -06:00
|
|
|
&{a} //~ ERROR borrow to an interior mutable value may end up in the final value
|
2018-11-21 03:37:18 -06:00
|
|
|
};
|
|
|
|
|
2018-11-21 04:13:49 -06:00
|
|
|
fn main() {}
|