@@ -18,8 +18,8 @@ use crate::styled_buffer::StyledBuffer;
18
18
use crate :: translation:: { to_fluent_args, Translate } ;
19
19
use crate :: {
20
20
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 ,
23
23
} ;
24
24
use rustc_lint_defs:: pluralize;
25
25
@@ -303,7 +303,7 @@ pub trait Emitter: Translate {
303
303
fn fix_multispans_in_extern_macros_and_render_macro_backtrace (
304
304
& self ,
305
305
span : & mut MultiSpan ,
306
- children : & mut Vec < SubDiagnostic > ,
306
+ children : & mut Vec < Subdiag > ,
307
307
level : & Level ,
308
308
backtrace : bool ,
309
309
) {
@@ -350,7 +350,7 @@ pub trait Emitter: Translate {
350
350
(in Nightly builds, run with -Z macro-backtrace for more info)",
351
351
) ;
352
352
353
- children. push ( SubDiagnostic {
353
+ children. push ( Subdiag {
354
354
level : Level :: Note ,
355
355
messages : vec ! [ ( DiagnosticMessage :: from( msg) , Style :: NoStyle ) ] ,
356
356
span : MultiSpan :: new ( ) ,
@@ -362,7 +362,7 @@ pub trait Emitter: Translate {
362
362
fn render_multispans_macro_backtrace (
363
363
& self ,
364
364
span : & mut MultiSpan ,
365
- children : & mut Vec < SubDiagnostic > ,
365
+ children : & mut Vec < Subdiag > ,
366
366
backtrace : bool ,
367
367
) {
368
368
for span in iter:: once ( span) . chain ( children. iter_mut ( ) . map ( |child| & mut child. span ) ) {
@@ -461,11 +461,7 @@ pub trait Emitter: Translate {
461
461
// This does a small "fix" for multispans by looking to see if it can find any that
462
462
// point directly at external macros. Since these are often difficult to read,
463
463
// 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 > ) {
469
465
debug ! ( "fix_multispans_in_extern_macros: before: span={:?} children={:?}" , span, children) ;
470
466
self . fix_multispan_in_extern_macros ( span) ;
471
467
for child in children. iter_mut ( ) {
@@ -1235,7 +1231,7 @@ impl HumanEmitter {
1235
1231
max
1236
1232
}
1237
1233
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 {
1239
1235
let primary = self . get_multispan_max_line_num ( span) ;
1240
1236
children
1241
1237
. iter ( )
@@ -2098,7 +2094,7 @@ impl HumanEmitter {
2098
2094
args : & FluentArgs < ' _ > ,
2099
2095
code : & Option < ErrCode > ,
2100
2096
span : & MultiSpan ,
2101
- children : & [ SubDiagnostic ] ,
2097
+ children : & [ Subdiag ] ,
2102
2098
suggestions : & [ CodeSuggestion ] ,
2103
2099
emitted_at : Option < & DiagnosticLocation > ,
2104
2100
) {
0 commit comments