diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-09-24 20:34:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-24 20:34:21 +0200 |
| commit | 4e225ee72dfe55a249f09dc40a0c4c58f29b637c (patch) | |
| tree | 61a90a7a8d75b5a61e165b448c932d2da0fd2519 /src/librustdoc | |
| parent | 79bb3c487998988253b34455a9fd4e1c93a3ead1 (diff) | |
| parent | 82c4018619b8ec48807151ce1164c9649e998b4d (diff) | |
| download | rust-4e225ee72dfe55a249f09dc40a0c4c58f29b637c.tar.gz rust-4e225ee72dfe55a249f09dc40a0c4c58f29b637c.zip | |
Rollup merge of #146897 - lolbinarycat:rustdoc-invalid_html_tags-ice-146890, r=GuillaumeGomez
fix ICE in rustdoc::invalid_html_tags fixes https://github.com/rust-lang/rust/issues/146890 r? ```@GuillaumeGomez```
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/passes/lint/html_tags.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/passes/lint/html_tags.rs b/src/librustdoc/passes/lint/html_tags.rs index da09117b1bb..136ff258048 100644 --- a/src/librustdoc/passes/lint/html_tags.rs +++ b/src/librustdoc/passes/lint/html_tags.rs @@ -364,6 +364,7 @@ impl TagParser { } else { if !self.tag_name.is_empty() { self.in_attrs = true; + // range of the entire tag within dox let mut r = Range { start: range.start + start_pos, end: range.start + pos }; if c == '>' { // In case we have a tag without attribute, we can consider the span to @@ -381,7 +382,7 @@ impl TagParser { for (new_pos, c) in text[pos..].char_indices() { if !c.is_whitespace() { if c == '>' { - r.end = range.start + new_pos + 1; + r.end = range.start + pos + new_pos + 1; found = true; } else if c == '<' { self.handle_lt_in_tag(range.clone(), pos + new_pos, f); |
