2018-11-21 10:37:18 +01:00
|
|
|
use std::cell::Cell;
|
|
|
|
|
|
|
|
|
|
const FOO: &(Cell<usize>, bool) = {
|
|
|
|
|
let mut a = (Cell::new(0), false);
|
2018-11-21 11:47:16 +01:00
|
|
|
a.1 = true; // sets `qualif(a)` to `qualif(a) | qualif(true)`
|
2025-06-27 15:32:53 +02:00
|
|
|
&{a} //~ ERROR interior mutable shared borrows of temporaries
|
2018-11-21 10:37:18 +01:00
|
|
|
};
|
|
|
|
|
|
2018-11-21 11:13:49 +01:00
|
|
|
fn main() {}
|