mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
10 lines
246 B
Rust
10 lines
246 B
Rust
use std::cell::Cell;
|
|
|
|
const FOO: &(Cell<usize>, bool) = {
|
|
let mut a = (Cell::new(0), false);
|
|
a.1 = true; // sets `qualif(a)` to `qualif(a) | qualif(true)`
|
|
&{a} //~ ERROR interior mutable shared borrows of temporaries
|
|
};
|
|
|
|
fn main() {}
|