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 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 can be enabled with a feature gate.