Skip to content

Commit f333ad8

Browse files
Improve code comment
1 parent be13105 commit f333ad8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/doctest/make.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ fn parse_source(source: &str, crate_name: &Option<&str>) -> Result<ParseSourceIn
334334
prev_span_hi: &mut Option<usize>,
335335
) {
336336
let extra_len = DOCTEST_CODE_WRAPPER.len();
337-
// We need to shift by 1 because we added `{` at the beginning of the source.we provided
338-
// to the parser.
337+
// We need to shift by the length of `DOCTEST_CODE_WRAPPER` because we
338+
// added it at the beginning of the source we provided to the parser.
339339
let lo = prev_span_hi.unwrap_or(0);
340340
let mut hi = span.hi().0 as usize - extra_len;
341341
if hi > source.len() {

0 commit comments

Comments
 (0)