about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-07-15 16:43:45 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-08-04 16:09:14 +0000
commit7c34f1a8d8bf45b7c0e4197f642d757b4e01ce01 (patch)
tree300cbc2cda643859fbd3feee62e6e15c753270e7 /tests
parent53e5fd6a61b42eb4a401a8d0de58eb6f6b39b9d4 (diff)
downloadrust-7c34f1a8d8bf45b7c0e4197f642d757b4e01ce01.tar.gz
rust-7c34f1a8d8bf45b7c0e4197f642d757b4e01ce01.zip
Make MissingDoc a module lint.
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/lint/lint-attr-everywhere-late.stderr36
-rw-r--r--tests/ui/lint/lint-missing-doc.stderr36
-rw-r--r--tests/ui/lint/missing-doc-private-macro.stderr12
3 files changed, 42 insertions, 42 deletions
diff --git a/tests/ui/lint/lint-attr-everywhere-late.stderr b/tests/ui/lint/lint-attr-everywhere-late.stderr
index be4368c5cc3..7fe078068fe 100644
--- a/tests/ui/lint/lint-attr-everywhere-late.stderr
+++ b/tests/ui/lint/lint-attr-everywhere-late.stderr
@@ -34,12 +34,6 @@ note: the lint level is defined here
 LL |     #![deny(missing_docs)]
    |             ^^^^^^^^^^^^
 
-error: missing documentation for a function
-  --> $DIR/lint-attr-everywhere-late.rs:47:5
-   |
-LL |     pub fn missing_inner() {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^
-
 error: missing documentation for an associated function
   --> $DIR/lint-attr-everywhere-late.rs:54:5
    |
@@ -142,18 +136,6 @@ note: the lint level is defined here
 LL |     #[deny(missing_docs)]
    |            ^^^^^^^^^^^^
 
-error: missing documentation for a variant
-  --> $DIR/lint-attr-everywhere-late.rs:112:5
-   |
-LL |     Variant1,
-   |     ^^^^^^^^
-   |
-note: the lint level is defined here
-  --> $DIR/lint-attr-everywhere-late.rs:111:12
-   |
-LL |     #[deny(missing_docs)]
-   |            ^^^^^^^^^^^^
-
 error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
   --> $DIR/lint-attr-everywhere-late.rs:93:38
    |
@@ -196,6 +178,18 @@ note: the lint level is defined here
 LL |     #[deny(overflowing_literals)] const ASSOC_CONST: u8 = 1000;
    |            ^^^^^^^^^^^^^^^^^^^^
 
+error: missing documentation for a variant
+  --> $DIR/lint-attr-everywhere-late.rs:112:5
+   |
+LL |     Variant1,
+   |     ^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/lint-attr-everywhere-late.rs:111:12
+   |
+LL |     #[deny(missing_docs)]
+   |            ^^^^^^^^^^^^
+
 error: variable `PARAM` should have a snake case name
   --> $DIR/lint-attr-everywhere-late.rs:131:37
    |
@@ -402,6 +396,12 @@ note: the lint level is defined here
 LL |     TupleStruct(#[deny(enum_intrinsics_non_enums)] discriminant::<i32>(&123));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^
 
+error: missing documentation for a function
+  --> $DIR/lint-attr-everywhere-late.rs:47:5
+   |
+LL |     pub fn missing_inner() {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
 error: `clashing1` redeclared with a different signature
   --> $DIR/lint-attr-everywhere-late.rs:123:5
    |
diff --git a/tests/ui/lint/lint-missing-doc.stderr b/tests/ui/lint/lint-missing-doc.stderr
index adcc21c44b2..4e9ee4f2769 100644
--- a/tests/ui/lint/lint-missing-doc.stderr
+++ b/tests/ui/lint/lint-missing-doc.stderr
@@ -113,24 +113,6 @@ LL | pub static BAR4: u32 = 0;
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a function
-  --> $DIR/lint-missing-doc.rs:174:5
-   |
-LL |     pub fn undocumented1() {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^
-
-error: missing documentation for a function
-  --> $DIR/lint-missing-doc.rs:175:5
-   |
-LL |     pub fn undocumented2() {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^
-
-error: missing documentation for a function
-  --> $DIR/lint-missing-doc.rs:181:9
-   |
-LL |         pub fn also_undocumented1() {}
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: missing documentation for a function
   --> $DIR/lint-missing-doc.rs:196:5
    |
 LL |     pub fn extern_fn_undocumented(f: f32) -> f32;
@@ -154,5 +136,23 @@ error: missing documentation for a trait alias
 LL | pub trait T = Sync;
    | ^^^^^^^^^^^
 
+error: missing documentation for a function
+  --> $DIR/lint-missing-doc.rs:174:5
+   |
+LL |     pub fn undocumented1() {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error: missing documentation for a function
+  --> $DIR/lint-missing-doc.rs:175:5
+   |
+LL |     pub fn undocumented2() {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error: missing documentation for a function
+  --> $DIR/lint-missing-doc.rs:181:9
+   |
+LL |         pub fn also_undocumented1() {}
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 error: aborting due to 25 previous errors
 
diff --git a/tests/ui/lint/missing-doc-private-macro.stderr b/tests/ui/lint/missing-doc-private-macro.stderr
index 979b007d0ec..18c8ad2de6b 100644
--- a/tests/ui/lint/missing-doc-private-macro.stderr
+++ b/tests/ui/lint/missing-doc-private-macro.stderr
@@ -1,8 +1,8 @@
 error: missing documentation for a macro
-  --> $DIR/missing-doc-private-macro.rs:31:5
+  --> $DIR/missing-doc-private-macro.rs:37:1
    |
-LL |     macro_rules! exported_to_top_level {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub macro top_level_pub_macro {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/missing-doc-private-macro.rs:5:9
@@ -11,10 +11,10 @@ LL | #![deny(missing_docs)]
    |         ^^^^^^^^^^^^
 
 error: missing documentation for a macro
-  --> $DIR/missing-doc-private-macro.rs:37:1
+  --> $DIR/missing-doc-private-macro.rs:31:5
    |
-LL | pub macro top_level_pub_macro {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     macro_rules! exported_to_top_level {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors