pub fn check_legal_trait_for_method_call(tcx: TyCtxt, span: Span, trait_id: DefId) {
    if tcx.lang_items().drop_trait() == Some(trait_id) {
        struct_span_err!(tcx.sess, span, E0040, "explicit use of destructor method")
            .span_label(span, "explicit destructor calls not allowed")
            .emit();
    }
}
/// Check that it is legal to call methods of the trait corresponding
/// to `trait_id` (this only cares about the trait, not the specific
/// method that is called)
Check that it is legal to call methods of the trait corresponding
to `trait_id` (this only cares about the trait, not the specific
method that is called)
Check that it is legal to call methods of the trait corresponding to ` trait_id ` ( this only cares about the trait not the specific method that is called )
pub fn check_legal_trait_for_method_call(tcx: TyCtxt, span: Span, trait_id: DefId) {
    if tcx.lang_items().drop_trait() == Some(trait_id) {
        struct_span_err!(tcx.sess, span, E0040, "explicit use of destructor method")
            .span_label(span, "explicit destructor calls not allowed")
            .emit();
    }
}
pub fn check_legal_trait_for_method_call ( tcx : TyCtxt , span : Span , trait_id : DefId ) { if tcx . lang_items ( ) . drop_trait ( ) == Some ( trait_id ) { struct_span_err ! ( tcx sess span E0040 " " ) . span_label ( span , " " ) . emit ( ) ; } }
Check that it is legal to call methods of the trait corresponding
to `trait_id` (this only cares about the trait, not the specific
method that is called)
Check that it is legal to call methods of the trait corresponding to ` trait_id ` ( this only cares about the trait not the specific method that is called )
tcx
TyCtxt
span
Span
trait_id
DefId
tcx
TyCtxt
span
Span
trait_id
DefId