While is very important to not have static or const items of such types, during the evaluation of a static or const item we might want to work with intermediate values of this type.
E.g.
const FOO: usize = {
let mut x = [5, 6, 7];
x.swap(0, 1);
x[0] // should be `6`
};
seems totally reasonable.
While is very important to not have
staticorconstitems of such types, during the evaluation of astaticorconstitem we might want to work with intermediate values of this type.E.g.
seems totally reasonable.