@@ -18,8 +18,8 @@ use crate::styled_buffer::StyledBuffer;
1818use crate :: translation:: { to_fluent_args, Translate } ;
1919use crate :: {
2020 diagnostic:: DiagnosticLocation , CodeSuggestion , DiagCtxt , DiagInner , DiagnosticMessage ,
21- ErrCode , FluentBundle , LazyFallbackBundle , Level , MultiSpan , SubDiagnostic ,
22- SubstitutionHighlight , SuggestionStyle , TerminalUrl ,
21+ ErrCode , FluentBundle , LazyFallbackBundle , Level , MultiSpan , Subdiag , SubstitutionHighlight ,
22+ SuggestionStyle , TerminalUrl ,
2323} ;
2424use rustc_lint_defs:: pluralize;
2525
@@ -303,7 +303,7 @@ pub trait Emitter: Translate {
303303 fn fix_multispans_in_extern_macros_and_render_macro_backtrace (
304304 & self ,
305305 span : & mut MultiSpan ,
306- children : & mut Vec < SubDiagnostic > ,
306+ children : & mut Vec < Subdiag > ,
307307 level : & Level ,
308308 backtrace : bool ,
309309 ) {
@@ -350,7 +350,7 @@ pub trait Emitter: Translate {
350350 (in Nightly builds, run with -Z macro-backtrace for more info)",
351351 ) ;
352352
353- children. push ( SubDiagnostic {
353+ children. push ( Subdiag {
354354 level : Level :: Note ,
355355 messages : vec ! [ ( DiagnosticMessage :: from( msg) , Style :: NoStyle ) ] ,
356356 span : MultiSpan :: new ( ) ,
@@ -362,7 +362,7 @@ pub trait Emitter: Translate {
362362 fn render_multispans_macro_backtrace (
363363 & self ,
364364 span : & mut MultiSpan ,
365- children : & mut Vec < SubDiagnostic > ,
365+ children : & mut Vec < Subdiag > ,
366366 backtrace : bool ,
367367 ) {
368368 for span in iter:: once ( span) . chain ( children. iter_mut ( ) . map ( |child| & mut child. span ) ) {
@@ -461,11 +461,7 @@ pub trait Emitter: Translate {
461461 // This does a small "fix" for multispans by looking to see if it can find any that
462462 // point directly at external macros. Since these are often difficult to read,
463463 // this will change the span to point at the use site.
464- fn fix_multispans_in_extern_macros (
465- & self ,
466- span : & mut MultiSpan ,
467- children : & mut Vec < SubDiagnostic > ,
468- ) {
464+ fn fix_multispans_in_extern_macros ( & self , span : & mut MultiSpan , children : & mut Vec < Subdiag > ) {
469465 debug ! ( "fix_multispans_in_extern_macros: before: span={:?} children={:?}" , span, children) ;
470466 self . fix_multispan_in_extern_macros ( span) ;
471467 for child in children. iter_mut ( ) {
@@ -1235,7 +1231,7 @@ impl HumanEmitter {
12351231 max
12361232 }
12371233
1238- fn get_max_line_num ( & mut self , span : & MultiSpan , children : & [ SubDiagnostic ] ) -> usize {
1234+ fn get_max_line_num ( & mut self , span : & MultiSpan , children : & [ Subdiag ] ) -> usize {
12391235 let primary = self . get_multispan_max_line_num ( span) ;
12401236 children
12411237 . iter ( )
@@ -2098,7 +2094,7 @@ impl HumanEmitter {
20982094 args : & FluentArgs < ' _ > ,
20992095 code : & Option < ErrCode > ,
21002096 span : & MultiSpan ,
2101- children : & [ SubDiagnostic ] ,
2097+ children : & [ Subdiag ] ,
21022098 suggestions : & [ CodeSuggestion ] ,
21032099 emitted_at : Option < & DiagnosticLocation > ,
21042100 ) {
0 commit comments