Struct rustc_const_eval::transform::check_consts::ops::MutBorrow
source · pub struct MutBorrow(pub BorrowKind);
Expand description
This op is for &mut
borrows in the trailing expression of a constant
which uses the “enclosing scopes rule” to leak its locals into anonymous
static or const items.
Tuple Fields§
§0: BorrowKind
Trait Implementations§
source§impl<'tcx> NonConstOp<'tcx> for MutBorrow
impl<'tcx> NonConstOp<'tcx> for MutBorrow
source§fn status_in_item(&self, _ccx: &ConstCx<'_, 'tcx>) -> Status
fn status_in_item(&self, _ccx: &ConstCx<'_, 'tcx>) -> Status
Returns an enum indicating whether this operation is allowed within the given item.
fn importance(&self) -> DiagnosticImportance
fn build_error(
&self,
ccx: &ConstCx<'_, 'tcx>,
span: Span
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>
Auto Trait Implementations§
impl RefUnwindSafe for MutBorrow
impl Send for MutBorrow
impl Sync for MutBorrow
impl Unpin for MutBorrow
impl UnwindSafe for MutBorrow
Blanket Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte