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 {
1597
1597
annotated_files. swap ( 0 , pos) ;
1598
1598
}
1599
1599
1600
+ let annotated_files_len = annotated_files. len ( ) ;
1600
1601
// 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 ( ) {
1602
1603
// we can't annotate anything if the source is unavailable.
1603
1604
if !should_show_source_code (
1604
1605
& self . ignored_directories_in_source_blocks ,
@@ -1855,7 +1856,9 @@ impl HumanEmitter {
1855
1856
width_offset,
1856
1857
code_offset,
1857
1858
margin,
1858
- !is_cont && line_idx + 1 == annotated_file. lines . len ( ) ,
1859
+ !is_cont
1860
+ && line_idx + 1 == annotated_file. lines . len ( )
1861
+ && file_idx + 1 == annotated_files_len,
1859
1862
) ;
1860
1863
1861
1864
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
2
2
╭▸ $DIR/close_window.rs:9:7
3
3
│
4
4
LL │ s.method();
5
- ╰╴ ━━━━━━ private method
5
+ │ ━━━━━━ private method
6
6
│
7
7
⸬ $DIR/auxiliary/close_window.rs:3:5
8
8
│
You can’t perform that action at this time.
0 commit comments