[−][src]Trait rustc_mir::transform::check_consts::ops::NonConstOp
An operation that is not always allowed in a const context.
Provided methods
fn feature_gate() -> Option<Symbol>
Returns the Symbol corresponding to the feature gate that would enable this operation,
or None if such a feature gate does not exist.
fn is_allowed_in_item(&self, ccx: &ConstCx<'_, '_>) -> bool
Returns true if this operation is allowed in the given item.
This check should assume that we are not in a non-const fn, where all operations are
legal.
By default, it returns true if and only if this operation has a corresponding feature
gate and that gate is enabled.