about summary refs log tree commit diff
path: root/tests/ui/consts/partial_qualif.rs
blob: 18438cc576b19134411261bdd1d470553079f1c7 (plain)
1
2
3
4
5
6
7
8
9
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() {}