3 // this is overly conservative. The reset to `None` should clear `a` of all qualifications
4 // while we could fix this, it would be inconsistent with `qualif_overwrite_2.rs`.
5 // We can fix this properly in the future by allowing constants that do not depend on generics
6 // to be checked by an analysis on the final value instead of looking at the body.
7 const FOO: &Option<Cell<usize>> = {
8 let mut a = Some(Cell::new(0));
9 a = None; // sets `qualif(a)` to `qualif(a) | qualif(None)`
10 &{a} //~ ERROR cannot refer to interior mutable