pub fn filter_generated(&self, sub_span: Option<Span>, parent: Span) -> bool {
        if !generated_code(parent) {
            if sub_span.is_none() {
                // Edge case - this occurs on generated code with incorrect expansion info.
                return true;
            }
            return false;
        }
        // If sub_span is none, filter out generated code.
        if sub_span.is_none() {
            return true;
        }

        //If the span comes from a fake filemap, filter it.
        if !self.sess.codemap().lookup_char_pos(parent.lo).file.is_real_file() {
            return true;
        }

        // Otherwise, a generated span is deemed invalid if it is not a sub-span of the root
        // callsite. This filters out macro internal variables and most malformed spans.
        let span = self.sess.codemap().source_callsite(parent);
        !(span.contains(parent))
    }
/// Return true if the span is generated code, and
/// it is not a subspan of the root callsite.
///
/// Used to filter out spans of minimal value,
/// such as references to macro internal variables.
Return true if the span is generated code, and
it is not a subspan of the root callsite.

Used to filter out spans of minimal value,
such as references to macro internal variables.
Return true if the span is generated code and it is not a subspan of the root callsite . Used to filter out spans of minimal value such as references to macro internal variables .
pub fn filter_generated(&self, sub_span: Option<Span>, parent: Span) -> bool {
        if !generated_code(parent) {
            if sub_span.is_none() {
                // Edge case - this occurs on generated code with incorrect expansion info.
                return true;
            }
            return false;
        }
        // If sub_span is none, filter out generated code.
        if sub_span.is_none() {
            return true;
        }
        //If the span comes from a fake filemap, filter it.
        if !self.sess.codemap().lookup_char_pos(parent.lo).file.is_real_file() {
            return true;
        }
        // Otherwise, a generated span is deemed invalid if it is not a sub-span of the root
        // callsite. This filters out macro internal variables and most malformed spans.
        let span = self.sess.codemap().source_callsite(parent);
        !(span.contains(parent))
    }
pub fn filter_generated ( & self , sub_span : Option < Span > , parent : Span ) -> bool { if ! generated_code ( parent ) { if sub_span . is_none ( ) { // Edge case - this occurs on generated code with incorrect expansion info. return true ; } return false ; } // If sub_span is none, filter out generated code. if sub_span . is_none ( ) { return true ; } //If the span comes from a fake filemap, filter it. if ! self . sess . codemap ( ) . lookup_char_pos ( parent . lo ) . file . is_real_file ( ) { return true ; } // Otherwise, a generated span is deemed invalid if it is not a sub-span of the root // callsite. This filters out macro internal variables and most malformed spans. let span = self . sess . codemap ( ) . source_callsite ( parent ) ; ! ( span . contains ( parent ) ) }
Return true if the span is generated code, and
it is not a subspan of the root callsite.
Return true if the span is generated code and it is not a subspan of the root callsite .
&self
sub_span
Option<Span>
parent
Span
&self
sub_span
Option<Span>
parent
Span