pub fn source_callsite(&self, sp: Span) -> Span {
        let mut span = sp;
        // Special case - if a macro is parsed as an argument to another macro, the source
        // callsite is the first callsite, which is also source-equivalent to the span.
        let mut first = true;
        while span.expn_id != NO_EXPANSION && span.expn_id != COMMAND_LINE_EXPN {
            if let Some(callsite) = self.with_expn_info(span.expn_id,
                                               |ei| ei.map(|ei| ei.call_site.clone())) {
                if first && span.source_equal(&callsite) {
                    if self.lookup_char_pos(span.lo).file.is_real_file() {
                        return Span { expn_id: NO_EXPANSION, .. span };
                    }
                }
                first = false;
                span = callsite;
            }
            else {
                break;
            }
        }
        span
    }
/// Return the source span - this is either the supplied span, or the span for
/// the macro callsite that expanded to it.
Return the source span - this is either the supplied span, or the span for
the macro callsite that expanded to it.
Return the source span - this is either the supplied span or the span for the macro callsite that expanded to it .
pub fn source_callsite(&self, sp: Span) -> Span {
        let mut span = sp;
        // Special case - if a macro is parsed as an argument to another macro, the source
        // callsite is the first callsite, which is also source-equivalent to the span.
        let mut first = true;
        while span.expn_id != NO_EXPANSION && span.expn_id != COMMAND_LINE_EXPN {
            if let Some(callsite) = self.with_expn_info(span.expn_id,
                                               |ei| ei.map(|ei| ei.call_site.clone())) {
                if first && span.source_equal(&callsite) {
                    if self.lookup_char_pos(span.lo).file.is_real_file() {
                        return Span { expn_id: NO_EXPANSION, .. span };
                    }
                }
                first = false;
                span = callsite;
            }
            else {
                break;
            }
        }
        span
    }
pub fn source_callsite ( & self , sp : Span ) -> Span { let mut span = sp ; // Special case - if a macro is parsed as an argument to another macro, the source // callsite is the first callsite, which is also source-equivalent to the span. let mut first = true ; while span . expn_id != NO_EXPANSION && span . expn_id != COMMAND_LINE_EXPN { if let Some ( callsite ) = self . with_expn_info ( span . expn_id , | ei | ei . map ( | ei | ei . call_site . clone ( ) ) ) { if first && span . source_equal ( & callsite ) { if self . lookup_char_pos ( span . lo ) . file . is_real_file ( ) { return Span { expn_id : NO_EXPANSION , .. span } ; } } first = false ; span = callsite ; } else { break ; } } span }
Return the source span - this is either the supplied span, or the span for
the macro callsite that expanded to it.
Return the source span - this is either the supplied span or the span for the macro callsite that expanded to it .
&self
sp
Span
&self
sp
Span