File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1982,7 +1982,7 @@ impl EmitterWriter {
19821982 // We special case `#[derive(_)]\n` and other attribute suggestions, because those
19831983 // are the ones where context is most useful.
19841984 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 ( ) )
19861986 . expect ( "span_to_lines failed when emitting suggestion" ) ;
19871987 let line_num = sm. lookup_char_pos ( parts[ 0 ] . span . lo ( ) ) . line ;
19881988 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)]`
1111 --> $DIR/auxiliary/dummy_lib.rs:2:1
1212 |
13132 + #[derive(Debug)]
14- 3 | #[path = "auxiliary/dummy_lib.rs"]
14+ 3 | pub struct Dummy;
1515 |
1616
1717error: aborting due to previous error
You can’t perform that action at this time.
0 commit comments