]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/qualif_overwrite_2.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / consts / qualif_overwrite_2.rs
CommitLineData
a1dfa0c6
XL
1use std::cell::Cell;
2
3// const qualification is not smart enough to know about fields and always assumes that there might
4// be other fields that caused the qualification
5const FOO: &Option<Cell<usize>> = {
6 let mut a = (Some(Cell::new(0)),);
7 a.0 = None; // sets `qualif(a)` to `qualif(a) | qualif(None)`
5869c6ff 8 &{a.0} //~ ERROR cannot refer to interior mutable
a1dfa0c6
XL
9};
10
11fn main() {}