File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1597,8 +1597,9 @@ impl HumanEmitter {
15971597 annotated_files. swap ( 0 , pos) ;
15981598 }
15991599
1600+ let annotated_files_len = annotated_files. len ( ) ;
16001601 // Print out the annotate source lines that correspond with the error
1601- for annotated_file in annotated_files {
1602+ for ( file_idx , annotated_file) in annotated_files. into_iter ( ) . enumerate ( ) {
16021603 // we can't annotate anything if the source is unavailable.
16031604 if !should_show_source_code (
16041605 & self . ignored_directories_in_source_blocks ,
@@ -1855,7 +1856,9 @@ impl HumanEmitter {
18551856 width_offset,
18561857 code_offset,
18571858 margin,
1858- !is_cont && line_idx + 1 == annotated_file. lines . len ( ) ,
1859+ !is_cont
1860+ && file_idx + 1 == annotated_files_len
1861+ && line_idx + 1 == annotated_file. lines . len ( ) ,
18591862 ) ;
18601863
18611864 let mut to_add = FxHashMap :: default ( ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error[E0624]: method `method` is private
22 ╭▸ $DIR/close_window.rs:9:7
33 │
44LL │ s.method();
5- ╰╴ ━━━━━━ private method
5+ │ ━━━━━━ private method
66 │
77 ⸬ $DIR/auxiliary/close_window.rs:3:5
88 │
You can’t perform that action at this time.
0 commit comments