File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ impl JsonRenderer<'_> {
84
84
let lo = span. lo ( self . sess ( ) ) ;
85
85
Some ( Span {
86
86
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 ) ,
89
89
} )
90
90
} else {
91
91
None
Original file line number Diff line number Diff line change @@ -205,9 +205,9 @@ pub struct Item {
205
205
pub struct Span {
206
206
/// The path to the source file for this span relative to the path `rustdoc` was invoked with.
207
207
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`.
209
209
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`.
211
211
pub end : ( usize , usize ) ,
212
212
}
213
213
You can’t perform that action at this time.
0 commit comments