pub fn check_op_spanned<O>(&mut self, op: O, span: Span)
    where
        O: NonConstOp
    {
        trace!("check_op: op={:?}", op);

        if op.is_allowed_in_item(self) {
            return;
        }

        // If an operation is supported in miri (and is not already controlled by a feature gate) it
        // can be turned on with `-Zunleash-the-miri-inside-of-you`.
        let is_unleashable = O::IS_SUPPORTED_IN_MIRI
            && O::feature_gate(self.tcx).is_none();

        if is_unleashable && self.tcx.sess.opts.debugging_opts.unleash_the_miri_inside_of_you {
            self.tcx.sess.span_warn(span, "skipping const checks");
            return;
        }

        op.emit_error(self, span);
    }
/// Emits an error at the given `span` if an expression cannot be evaluated in the current
/// context.
Emits an error at the given `span` if an expression cannot be evaluated in the current
context.
Emits an error at the given ` span ` if an expression cannot be evaluated in the current context .
pub fn check_op_spanned<O>(&mut self, op: O, span: Span)
    where
        O: NonConstOp
    {
        trace!("check_op: op={:?}", op);
        if op.is_allowed_in_item(self) {
            return;
        }
        // If an operation is supported in miri (and is not already controlled by a feature gate) it
        // can be turned on with `-Zunleash-the-miri-inside-of-you`.
        let is_unleashable = O::IS_SUPPORTED_IN_MIRI
            && O::feature_gate(self.tcx).is_none();
        if is_unleashable && self.tcx.sess.opts.debugging_opts.unleash_the_miri_inside_of_you {
            self.tcx.sess.span_warn(span, "skipping const checks");
            return;
        }
        op.emit_error(self, span);
    }
pub fn check_op_spanned < O > ( & mut self , op : O , span : Span ) where O : NonConstOp { trace ! ( " " op ) ; if op . is_allowed_in_item ( self ) { return ; } // If an operation is supported in miri (and is not already controlled by a feature gate) it // can be turned on with `-Zunleash-the-miri-inside-of-you`. let is_unleashable = O :: IS_SUPPORTED_IN_MIRI && O :: feature_gate ( self . tcx ) . is_none ( ) ; if is_unleashable && self . tcx . sess . opts . debugging_opts . unleash_the_miri_inside_of_you { self . tcx . sess . span_warn ( span , " " ) ; return ; } op . emit_error ( self , span ) ; }
Emits an error at the given `span` if an expression cannot be evaluated in the current
context.
Emits an error at the given ` span ` if an expression cannot be evaluated in the current context .
&mut self
op
O
span
Span