This is a tracking issue for the CONST_EVAL_MUTABLE_PTR_IN_FINAL_VALUE lint, which is being added in #122204. The lint detects cases where a const expression evaluates to a value that holds a pointer to mutable state, which is undefined behavior and may be rejected by a future version of the compiler.
Example
This lint will trigger for code like this:
use std::cell::Cell;
pub enum JsValue {
Undefined,
Object(Cell<bool>),
}
impl ::std::ops::Drop for JsValue {
fn drop(&mut self) {}
}
const UNDEFINED: &JsValue = &JsValue::Undefined;
fn main() {
}
Cc #121610
This is a tracking issue for the
CONST_EVAL_MUTABLE_PTR_IN_FINAL_VALUElint, which is being added in #122204. The lint detects cases where a const expression evaluates to a value that holds a pointer to mutable state, which is undefined behavior and may be rejected by a future version of the compiler.Example
This lint will trigger for code like this:
Cc #121610