Improve code

This commit is contained in:
Guillaume Gomez 2020-09-26 15:18:38 +02:00
parent 4a3746e67b
commit 6163d89224
3 changed files with 58 additions and 13 deletions

View file

@ -20,3 +20,22 @@ pub fn foo() {}
/// </hello>
//~^ ERROR unopened HTML tag `hello`
pub fn f() {}
/// <div>
/// <br/> <p>
//~^ ERROR unclosed HTML tag `p`
/// </div>
pub fn a() {}
/// <div>
/// <p>
/// <div></div>
/// </p>
/// </div>
pub fn b() {}
/// <div style="hello">
//~^ ERROR unclosed HTML tag `div`
/// <h3>
//~^ ERROR unclosed HTML tag `h3`
pub fn c() {}

View file

@ -2,7 +2,7 @@ error: unclosed HTML tag `unknown`
--> $DIR/invalid-html-tags.rs:7:5
|
LL | /// <unknown>
| ^^^^^^^^
| ^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/invalid-html-tags.rs:1:9
@ -14,25 +14,43 @@ error: unclosed HTML tag `script`
--> $DIR/invalid-html-tags.rs:10:5
|
LL | /// <script>
| ^^^^^^^
| ^^^^^^^^
error: unclosed HTML tag `h2`
--> $DIR/invalid-html-tags.rs:15:7
|
LL | /// <h2>
| ^^^
| ^^^^
error: unclosed HTML tag `h3`
--> $DIR/invalid-html-tags.rs:17:9
|
LL | /// <h3>
| ^^^
| ^^^^
error: unopened HTML tag `hello`
--> $DIR/invalid-html-tags.rs:20:5
|
LL | /// </hello>
| ^^^^^^^
| ^^^^^^^^
error: aborting due to 5 previous errors
error: unclosed HTML tag `p`
--> $DIR/invalid-html-tags.rs:25:14
|
LL | /// <br/> <p>
| ^^^
error: unclosed HTML tag `div`
--> $DIR/invalid-html-tags.rs:37:5
|
LL | /// <div style="hello">
| ^^^^
error: unclosed HTML tag `h3`
--> $DIR/invalid-html-tags.rs:39:7
|
LL | /// <h3>
| ^^^^
error: aborting due to 8 previous errors