File tree 2 files changed +2
-2
lines changed
compiler/rustc_errors/src
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1982,7 +1982,7 @@ impl EmitterWriter {
1982
1982
// We special case `#[derive(_)]\n` and other attribute suggestions, because those
1983
1983
// are the ones where context is most useful.
1984
1984
let file_lines = sm
1985
- . span_to_lines ( span . primary_span ( ) . unwrap ( ) . shrink_to_hi ( ) )
1985
+ . span_to_lines ( parts [ 0 ] . span . shrink_to_hi ( ) )
1986
1986
. expect ( "span_to_lines failed when emitting suggestion" ) ;
1987
1987
let line_num = sm. lookup_char_pos ( parts[ 0 ] . span . lo ( ) ) . line ;
1988
1988
if let Some ( line) = file_lines. file . get_line ( line_num - 1 ) {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ help: consider annotating `Dummy` with `#[derive(Debug)]`
11
11
--> $DIR/auxiliary/dummy_lib.rs:2:1
12
12
|
13
13
2 + #[derive(Debug)]
14
- 3 | #[path = "auxiliary/dummy_lib.rs"]
14
+ 3 | pub struct Dummy;
15
15
|
16
16
17
17
error: aborting due to previous error
You can’t perform that action at this time.
0 commit comments