diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-10-03 16:23:03 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-10-03 16:23:03 +0200 |
| commit | d3b7b7e23a58e772194677b54672ff118ecc9093 (patch) | |
| tree | 3d3bf09d0c7846274da7f42a7ab6a8ec4a2595be /src/test/rustdoc-ui | |
| parent | ca199b16e5c06c28b3d35de79ffaaff81bd0d43f (diff) | |
| download | rust-d3b7b7e23a58e772194677b54672ff118ecc9093.tar.gz rust-d3b7b7e23a58e772194677b54672ff118ecc9093.zip | |
Enforce closing HTML tags to have a ">" character
Diffstat (limited to 'src/test/rustdoc-ui')
| -rw-r--r-- | src/test/rustdoc-ui/invalid-html-tags.rs | 8 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/invalid-html-tags.stderr | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/test/rustdoc-ui/invalid-html-tags.rs b/src/test/rustdoc-ui/invalid-html-tags.rs index db97ab4456c..d878e390ca3 100644 --- a/src/test/rustdoc-ui/invalid-html-tags.rs +++ b/src/test/rustdoc-ui/invalid-html-tags.rs @@ -23,7 +23,7 @@ pub fn foo() {} /// </h1> /// </hello> //~^ ERROR unopened HTML tag `hello` -pub fn f() {} +pub fn bar() {} /// <div> /// <br/> <p> @@ -67,3 +67,9 @@ pub fn d() {} /// </div> /// </style> pub fn e() {} + +// Closing tags need to have ">" at the end, otherwise it's not a closing tag! +/// <div></div > +/// <div></div +//~^ ERROR unclosed HTML tag `div` +pub fn f() {} diff --git a/src/test/rustdoc-ui/invalid-html-tags.stderr b/src/test/rustdoc-ui/invalid-html-tags.stderr index caa5dd124c1..11f176ff05c 100644 --- a/src/test/rustdoc-ui/invalid-html-tags.stderr +++ b/src/test/rustdoc-ui/invalid-html-tags.stderr @@ -70,5 +70,11 @@ error: unclosed HTML tag `script` LL | /// <script | ^^^^^^ -error: aborting due to 11 previous errors +error: unclosed HTML tag `div` + --> $DIR/invalid-html-tags.rs:73:5 + | +LL | /// <div></div + | ^^^^^ + +error: aborting due to 12 previous errors |
