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 {
2412
2412
// too bad to begin with, so we side-step that issue here.
2413
2413
for ( i, line) in snippet. lines ( ) . enumerate ( ) {
2414
2414
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 ) ;
2416
2416
// On the first line, we highlight between the start of the part
2417
2417
// span, and the end of that line.
2418
2418
// 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