Skip to main content

field_is_static_mut_ref

Function field_is_static_mut_ref 

Source
fn field_is_static_mut_ref(declared_ty: Ty<'_>) -> bool
Expand description

Whether the declared field type is literally &'static mut T.

This is an early diagnostic improvement, not a soundness requirement. We deliberately inspect the declared type without normalization or substitution, so projections and effectively static lifetime parameters are not necessarily rejected here. Borrow checking must handle those cases independently.