fn deny_drop(&self) {
        if self.mode == Mode::Fn || !self.qualif.intersects(Qualif::NEEDS_DROP) {
            return;
        }

        // Static and const fn's allow destructors, but they're feature-gated.
        let msg = if self.mode != Mode::Const {
            // Feature-gate for globals with destructors is enabled.
            if self.tcx.sess.features.borrow().drop_types_in_const {
                return;
            }

            // This comes from a macro that has #[allow_internal_unstable].
            if self.tcx.sess.codemap().span_allows_unstable(self.span) {
                return;
            }

            format!("destructors in {}s are an unstable feature",
                    self.mode)
        } else {
            format!("{}s are not allowed to have destructors",
                    self.mode)
        };

        let mut err =
            struct_span_err!(self.tcx.sess, self.span, E0493, "{}", msg);

        if self.mode != Mode::Const {
            help!(&mut err,
                  "in Nightly builds, add `#![feature(drop_types_in_const)]` \
                   to the crate attributes to enable");
        } else {
            self.find_drop_implementation_method_span()
                .map(|span| err.span_label(span, &format!("destructor defined here")));

            err.span_label(self.span, &format!("constants cannot have destructors"));
        }

        err.emit();
    }
/// Check for NEEDS_DROP (from an ADT or const fn call) and
/// error, unless we're in a function, or the feature-gate
/// for globals with destructors is enabled.
Check for NEEDS_DROP (from an ADT or const fn call) and
error, unless we're in a function, or the feature-gate
for globals with destructors is enabled.
Check for NEEDS_DROP ( from an ADT or const fn call ) and error unless we ' re in a function or the feature - gate for globals with destructors is enabled .
fn deny_drop(&self) {
        if self.mode == Mode::Fn || !self.qualif.intersects(Qualif::NEEDS_DROP) {
            return;
        }
        // Static and const fn's allow destructors, but they're feature-gated.
        let msg = if self.mode != Mode::Const {
            // Feature-gate for globals with destructors is enabled.
            if self.tcx.sess.features.borrow().drop_types_in_const {
                return;
            }
            // This comes from a macro that has #[allow_internal_unstable].
            if self.tcx.sess.codemap().span_allows_unstable(self.span) {
                return;
            }
            format!("destructors in {}s are an unstable feature",
                    self.mode)
        } else {
            format!("{}s are not allowed to have destructors",
                    self.mode)
        };
        let mut err =
            struct_span_err!(self.tcx.sess, self.span, E0493, "{}", msg);
        if self.mode != Mode::Const {
            help!(&mut err,
                  "in Nightly builds, add `#![feature(drop_types_in_const)]` \
                   to the crate attributes to enable");
        } else {
            self.find_drop_implementation_method_span()
                .map(|span| err.span_label(span, &format!("destructor defined here")));
            err.span_label(self.span, &format!("constants cannot have destructors"));
        }
        err.emit();
    }
fn deny_drop ( & self ) { if self . mode == Mode :: Fn || ! self . qualif . intersects ( Qualif :: NEEDS_DROP ) { return ; } // Static and const fn's allow destructors, but they're feature-gated. let msg = if self . mode != Mode :: Const { // Feature-gate for globals with destructors is enabled. if self . tcx . sess . features . borrow ( ) . drop_types_in_const { return ; } // This comes from a macro that has #[allow_internal_unstable]. if self . tcx . sess . codemap ( ) . span_allows_unstable ( self . span ) { return ; } format ! ( " " self mode ) } else { format ! ( " " self mode ) } ; let mut err = struct_span_err ! ( self tcx sess self span E0493 " " msg ) ; if self . mode != Mode :: Const { help ! ( mut err " \
 " ) ; } else { self . find_drop_implementation_method_span ( ) . map ( | span | err . span_label ( span , & format ! ( " " ) ) ) ; err . span_label ( self . span , & format ! ( " " ) ) ; } err . emit ( ) ; }
Check for NEEDS_DROP (from an ADT or const fn call) and
error, unless we're in a function, or the feature-gate
for globals with destructors is enabled.
Check for NEEDS_DROP ( from an ADT or const fn call ) and error unless we ' re in a function or the feature - gate for globals with destructors is enabled .
&self
&self