about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-09-26 22:50:34 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-10-03 14:16:24 +0200
commitb2321bb8da18c753fe3b9b71937a368ae42b8c4b (patch)
tree2d405d20f5673b576a96f06c2f3a0beb6d65b713
parent6163d892248a2af02b36a0121bb5bf02a5566d2b (diff)
downloadrust-b2321bb8da18c753fe3b9b71937a368ae42b8c4b.tar.gz
rust-b2321bb8da18c753fe3b9b71937a368ae42b8c4b.zip
Add test for invalid_html_tag lint in deny(rustdoc)
-rw-r--r--src/test/rustdoc-ui/lint-group.rs5
-rw-r--r--src/test/rustdoc-ui/lint-group.stderr21
2 files changed, 25 insertions, 1 deletions
diff --git a/src/test/rustdoc-ui/lint-group.rs b/src/test/rustdoc-ui/lint-group.rs
index e58c8b12f68..1446f7f1c1f 100644
--- a/src/test/rustdoc-ui/lint-group.rs
+++ b/src/test/rustdoc-ui/lint-group.rs
@@ -22,3 +22,8 @@ pub fn no_doctest() {} //~^ ERROR missing code example in this documentation
 /// println!("sup");
 /// ```
 fn private_doctest() {} //~^^^^^ ERROR documentation test in private item
+
+/// <unknown>
+//~^ ERROR unclosed HTML tag `unknown`
+//~^^ ERROR missing code example
+pub fn c() {}
diff --git a/src/test/rustdoc-ui/lint-group.stderr b/src/test/rustdoc-ui/lint-group.stderr
index 4e9134ea469..8bc6f40b4b9 100644
--- a/src/test/rustdoc-ui/lint-group.stderr
+++ b/src/test/rustdoc-ui/lint-group.stderr
@@ -28,6 +28,12 @@ LL | #![deny(rustdoc)]
    |         ^^^^^^^
    = note: `#[deny(private_doc_tests)]` implied by `#[deny(rustdoc)]`
 
+error: missing code example in this documentation
+  --> $DIR/lint-group.rs:26:1
+   |
+LL | /// <unknown>
+   | ^^^^^^^^^^^^^
+
 error: unresolved link to `error`
   --> $DIR/lint-group.rs:9:29
    |
@@ -42,5 +48,18 @@ LL | #![deny(rustdoc)]
    = note: `#[deny(broken_intra_doc_links)]` implied by `#[deny(rustdoc)]`
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
 
-error: aborting due to 3 previous errors
+error: unclosed HTML tag `unknown`
+  --> $DIR/lint-group.rs:26:5
+   |
+LL | /// <unknown>
+   |     ^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/lint-group.rs:7:9
+   |
+LL | #![deny(rustdoc)]
+   |         ^^^^^^^
+   = note: `#[deny(invalid_html_tags)]` implied by `#[deny(rustdoc)]`
+
+error: aborting due to 5 previous errors