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