File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -742,11 +742,20 @@ impl EmitterWriter {
742
742
// Don't print recursive invocations
743
743
if ei. call_site != last_span {
744
744
last_span = ei. call_site ;
745
- try!( self . print_diagnostic ( & cm. span_to_string ( ei. call_site ) , Note ,
746
- & format ! ( "in this expansion of {}{}{}" ,
747
- pre,
748
- ei. callee. name( ) ,
749
- post) ,
745
+
746
+ let mut diag_string = format ! ( "in this expansion of {}{}{}" ,
747
+ pre,
748
+ ei. callee. name( ) ,
749
+ post) ;
750
+
751
+ if let Some ( def_site_span) = ei. callee . span {
752
+ diag_string. push_str ( & format ! ( " (defined in {})" ,
753
+ cm. span_to_filename( def_site_span) ) ) ;
754
+ }
755
+
756
+ try!( self . print_diagnostic ( & cm. span_to_string ( ei. call_site ) ,
757
+ Note ,
758
+ & diag_string,
750
759
None ) ) ;
751
760
}
752
761
Ok ( Some ( ei. call_site ) )
You can’t perform that action at this time.
0 commit comments