File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -250,3 +250,36 @@ warning: unknown attribute `should-panic`. Did you mean `should_panic`?
250
250
251
251
In the example above, the correct form is ` should_panic ` . This helps detect
252
252
typo mistakes for some common attributes.
253
+
254
+ ## invalid_html_tags
255
+
256
+ This lint ** warns by default** . It detects unclosed or invalid HTML tags.
257
+ For example:
258
+
259
+ ``` rust
260
+ /// <h1>
261
+ /// </script>
262
+ pub fn foo () {}
263
+ ```
264
+
265
+ Which will give:
266
+
267
+ ``` text
268
+ warning: unopened HTML tag `script`
269
+ --> foo.rs:1:1
270
+ |
271
+ 1 | / /// <h1>
272
+ 2 | | /// </script>
273
+ | |_____________^
274
+ |
275
+ = note: `#[warn(invalid_html_tags)]` on by default
276
+
277
+ warning: unclosed HTML tag `h1`
278
+ --> foo.rs:1:1
279
+ |
280
+ 1 | / /// <h1>
281
+ 2 | | /// </script>
282
+ | |_____________^
283
+
284
+ warning: 2 warnings emitted
285
+ ```
You can’t perform that action at this time.
0 commit comments