Skip to content

Commit

Permalink
Fix panic when intra-doc link comes from a generated doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 1, 2022
1 parent b8967b0 commit 741553e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/passes/mod.rs
Expand Up @@ -178,7 +178,7 @@ crate fn source_span_for_markdown_range(

'outer: for (line_no, md_line) in md_lines.enumerate() {
loop {
let source_line = src_lines.next().expect("could not find markdown in source");
let source_line = src_lines.next()?;
match source_line.find(md_line) {
Some(offset) => {
if line_no == starting_line {
Expand Down

0 comments on commit 741553e

Please sign in to comment.