Fix panic when intra-doc link comes from a generated doc comment

This commit is contained in:
Guillaume Gomez 2022-03-01 12:06:52 +01:00
parent b8967b0d52
commit 741553e55a

View File

@ -178,7 +178,7 @@ impl ConditionalPass {
'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 {