Trait rustc_mir::transform::check_consts::ops::NonConstOp [−][src]
pub trait NonConstOp: Debug { fn build_error<'tcx>(
&self,
ccx: &ConstCx<'_, 'tcx>,
span: Span
) -> DiagnosticBuilder<'tcx>; fn status_in_item(&self, _ccx: &ConstCx<'_, '_>) -> Status { ... } fn importance(&self) -> DiagnosticImportance { ... } }
Expand description
An operation that is not always allowed in a const context.
Required methods
fn build_error<'tcx>(
&self,
ccx: &ConstCx<'_, 'tcx>,
span: Span
) -> DiagnosticBuilder<'tcx>Provided methods
fn status_in_item(&self, _ccx: &ConstCx<'_, '_>) -> Status
fn status_in_item(&self, _ccx: &ConstCx<'_, '_>) -> StatusReturns an enum indicating whether this operation is allowed within the given item.
fn importance(&self) -> DiagnosticImportance