pub fn expansion_cause(&self) -> Option<Span> {
        let mut ctxt = self.backtrace();
        let mut last_macro = None;
        loop {
            if ctxt.outer().expn_info().map_or(None, |info| {
                if info.format.name() == "include" {
                    // Stop going up the backtrace once include! is encountered
                    return None;
                }
                ctxt = info.call_site.ctxt();
                last_macro = Some(info.call_site);
                Some(())
            }).is_none() {
                break
            }
        }
        last_macro
    }
/// Returns span for the macro which originally caused the current expansion to happen.
///
/// Stops backtracing at include! boundary.
Returns span for the macro which originally caused the current expansion to happen.
Stops backtracing at include. boundary.
Returns span for the macro which originally caused the current expansion to happen . Stops backtracing at include . boundary .
pub fn expansion_cause(&self) -> Option<Span> {
        let mut ctxt = self.backtrace();
        let mut last_macro = None;
        loop {
            if ctxt.outer().expn_info().map_or(None, |info| {
                if info.format.name() == "include" {
                    // Stop going up the backtrace once include! is encountered
                    return None;
                }
                ctxt = info.call_site.ctxt();
                last_macro = Some(info.call_site);
                Some(())
            }).is_none() {
                break
            }
        }
        last_macro
    }
pub fn expansion_cause ( & self ) -> Option < Span > { let mut ctxt = self . backtrace ( ) ; let mut last_macro = None ; loop { if ctxt . outer ( ) . expn_info ( ) . map_or ( None , | info | { if info . format . name ( ) == " " { // Stop going up the backtrace once include! is encountered return None ; } ctxt = info . call_site . ctxt ( ) ; last_macro = Some ( info . call_site ) ; Some ( ( ) ) } ) . is_none ( ) { break } } last_macro }
Returns span for the macro which originally caused the current expansion to happen.
Returns span for the macro which originally caused the current expansion to happen .
&self
&self