File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ impl JsonRenderer<'_> {
8484 let lo = span. lo ( self . sess ( ) ) ;
8585 Some ( Span {
8686 filename : local_path,
87- begin : ( lo. line , lo. col . to_usize ( ) ) ,
88- end : ( hi. line , hi. col . to_usize ( ) ) ,
87+ begin : ( lo. line , lo. col . to_usize ( ) + 1 ) ,
88+ end : ( hi. line , hi. col . to_usize ( ) + 1 ) ,
8989 } )
9090 } else {
9191 None
Original file line number Diff line number Diff line change @@ -149,9 +149,9 @@ pub struct Item {
149149pub struct Span {
150150 /// The path to the source file for this span relative to the path `rustdoc` was invoked with.
151151 pub filename : PathBuf ,
152- /// Zero indexed Line and Column of the first character of the `Span`
152+ /// One indexed Line and Column of the first character of the `Span`.
153153 pub begin : ( usize , usize ) ,
154- /// Zero indexed Line and Column of the last character of the `Span`
154+ /// One indexed Line and Column of the last character of the `Span`.
155155 pub end : ( usize , usize ) ,
156156}
157157
You can’t perform that action at this time.
0 commit comments