summary refs log tree commit diff
path: root/src/test/ui/consts/partial_qualif.rs
blob: 4ce41f80f82c8dff332491835619331abdf21e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(const_let)]

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 cannot borrow a constant which may contain interior mutability
};

fn main() {}