File tree Expand file tree Collapse file tree 3 files changed +103
-1
lines changed
compiler/rustc_errors/src
tests/ui/argument-suggestions Expand file tree Collapse file tree 3 files changed +103
-1
lines changed Original file line number Diff line number Diff line change @@ -2412,7 +2412,7 @@ impl HumanEmitter {
24122412 // too bad to begin with, so we side-step that issue here.
24132413 for ( i, line) in snippet. lines ( ) . enumerate ( ) {
24142414 let line = normalize_whitespace ( line) ;
2415- let row = row_num - 2 - ( newlines - i - 1 ) ;
2415+ let row = ( row_num - 2 - ( newlines - i - 1 ) ) . max ( 2 ) ;
24162416 // On the first line, we highlight between the start of the part
24172417 // span, and the end of that line.
24182418 // On the last line, we highlight between the start of the line, and
Original file line number Diff line number Diff line change 1+ //@ only-linux
2+ //@ compile-flags: --error-format=human --color=always
3+
4+ // The hightlight span should be correct. See #147070
5+ struct Thingie ;
6+
7+ impl Thingie {
8+ pub ( crate ) fn new (
9+ _a : String ,
10+ _b : String ,
11+ _c : String ,
12+ _d : String ,
13+ _e : String ,
14+ _f : String ,
15+ ) -> Self {
16+ unimplemented ! ( )
17+ }
18+ }
19+
20+ fn main ( ) {
21+ let foo = Thingie :: new (
22+ String :: from ( "" ) ,
23+ String :: from ( "" ) ,
24+ String :: from ( "" ) ,
25+ String :: from ( "" ) ,
26+ String :: from ( "" ) ,
27+ String :: from ( "" ) ,
28+ String :: from ( "" ) ,
29+ ) ;
30+ }
You can’t perform that action at this time.
0 commit comments