Trait rustc_const_eval::transform::check_consts::ops::NonConstOp
source · pub trait NonConstOp<'tcx>: Debug {
fn build_error(
&self,
ccx: &ConstCx<'_, 'tcx>,
span: Span
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>;
fn status_in_item(&self, _ccx: &ConstCx<'_, 'tcx>) -> Status { ... }
fn importance(&self) -> DiagnosticImportance { ... }
}
Expand description
An operation that is not always allowed in a const context.
Required Methods§
fn build_error(
&self,
ccx: &ConstCx<'_, 'tcx>,
span: Span
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>
Provided Methods§
sourcefn 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.