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 @@ -205,9 +205,9 @@ pub struct Item {
205205pub struct Span {
206206 /// The path to the source file for this span relative to the path `rustdoc` was invoked with.
207207 pub filename : PathBuf ,
208- /// Zero indexed Line and Column of the first character of the `Span`
208+ /// One indexed Line and Column of the first character of the `Span`.
209209 pub begin : ( usize , usize ) ,
210- /// Zero indexed Line and Column of the last character of the `Span`
210+ /// One indexed Line and Column of the last character of the `Span`.
211211 pub end : ( usize , usize ) ,
212212}
213213
You can’t perform that action at this time.
0 commit comments