From e50fed79a857ccf3ea516fb4d7fdab665b7a573c Mon Sep 17 00:00:00 2001 From: binarycat Date: Sun, 17 Aug 2025 12:35:54 -0500 Subject: [PATCH] add regression test for #145529 --- tests/rustdoc-ui/lints/invalid-html-tags.rs | 31 +++++++++++++++++++ .../rustdoc-ui/lints/invalid-html-tags.stderr | 14 ++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/tests/rustdoc-ui/lints/invalid-html-tags.rs b/tests/rustdoc-ui/lints/invalid-html-tags.rs index 317f1fd1d464..b2f516725fa9 100644 --- a/tests/rustdoc-ui/lints/invalid-html-tags.rs +++ b/tests/rustdoc-ui/lints/invalid-html-tags.rs @@ -121,3 +121,34 @@ pub fn no_error_1() {} /// backslashed \< //~^ ERROR unclosed HTML tag `a` pub fn p() {} + +/// +/// +/// +pub fn no_error_2() {} + +///
+/// +///
+pub fn no_error_3() {} + +/// unfinished ALLOWED_UNCLOSED +/// +///
+/// +//~^ ERROR unclosed HTML tag `img` +pub fn r() {} diff --git a/tests/rustdoc-ui/lints/invalid-html-tags.stderr b/tests/rustdoc-ui/lints/invalid-html-tags.stderr index 9c2bfcf2c3dd..fc9849ff23cf 100644 --- a/tests/rustdoc-ui/lints/invalid-html-tags.stderr +++ b/tests/rustdoc-ui/lints/invalid-html-tags.stderr @@ -100,5 +100,17 @@ error: unclosed HTML tag `a` LL | /// backslashed \<
| ^^ -error: aborting due to 16 previous errors +error: unclosed HTML tag `img` + --> $DIR/invalid-html-tags.rs:147:5 + | +LL | /// $DIR/invalid-html-tags.rs:152:8 + | +LL | ///

+ | ^^^^ + +error: aborting due to 18 previous errors