summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/lints
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/rustdoc-ui/lints
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-ui/lints')
-rw-r--r--tests/rustdoc-ui/lints/check-attr.rs17
-rw-r--r--tests/rustdoc-ui/lints/check-attr.stderr80
-rw-r--r--tests/rustdoc-ui/lints/check-fail.stderr6
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr2
-rw-r--r--tests/rustdoc-ui/lints/doc-spotlight.stderr2
-rw-r--r--tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr2
-rw-r--r--tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr2
7 files changed, 92 insertions, 19 deletions
diff --git a/tests/rustdoc-ui/lints/check-attr.rs b/tests/rustdoc-ui/lints/check-attr.rs
index 0b3f7bedd..3c06e6c07 100644
--- a/tests/rustdoc-ui/lints/check-attr.rs
+++ b/tests/rustdoc-ui/lints/check-attr.rs
@@ -39,3 +39,20 @@ pub fn foobar() {}
/// boo
/// ```
pub fn b() {}
+
+/// b
+//~^ ERROR
+///
+/// ```rust2018
+/// boo
+/// ```
+pub fn c() {}
+
+/// b
+//~^ ERROR
+//~| ERROR
+///
+/// ```rust2018 shouldpanic
+/// boo
+/// ```
+pub fn d() {}
diff --git a/tests/rustdoc-ui/lints/check-attr.stderr b/tests/rustdoc-ui/lints/check-attr.stderr
index f66e63ab7..d640125ab 100644
--- a/tests/rustdoc-ui/lints/check-attr.stderr
+++ b/tests/rustdoc-ui/lints/check-attr.stderr
@@ -1,4 +1,4 @@
-error: unknown attribute `compile-fail`. Did you mean `compile_fail`?
+error: unknown attribute `compile-fail`
--> $DIR/check-attr.rs:3:1
|
LL | / /// foo
@@ -10,6 +10,7 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
note: the lint level is defined here
--> $DIR/check-attr.rs:1:9
@@ -17,7 +18,7 @@ note: the lint level is defined here
LL | #![deny(rustdoc::invalid_codeblock_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: unknown attribute `compilefail`. Did you mean `compile_fail`?
+error: unknown attribute `compilefail`
--> $DIR/check-attr.rs:3:1
|
LL | / /// foo
@@ -29,9 +30,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
-error: unknown attribute `comPile_fail`. Did you mean `compile_fail`?
+error: unknown attribute `comPile_fail`
--> $DIR/check-attr.rs:3:1
|
LL | / /// foo
@@ -43,9 +45,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
-error: unknown attribute `should-panic`. Did you mean `should_panic`?
+error: unknown attribute `should-panic`
--> $DIR/check-attr.rs:13:1
|
LL | / /// bar
@@ -57,9 +60,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `shouldpanic`. Did you mean `should_panic`?
+error: unknown attribute `shouldpanic`
--> $DIR/check-attr.rs:13:1
|
LL | / /// bar
@@ -71,9 +75,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `sHould_panic`. Did you mean `should_panic`?
+error: unknown attribute `sHould_panic`
--> $DIR/check-attr.rs:13:1
|
LL | / /// bar
@@ -85,9 +90,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `no-run`. Did you mean `no_run`?
+error: unknown attribute `no-run`
--> $DIR/check-attr.rs:23:1
|
LL | / /// foobar
@@ -99,9 +105,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `norun`. Did you mean `no_run`?
+error: unknown attribute `norun`
--> $DIR/check-attr.rs:23:1
|
LL | / /// foobar
@@ -113,9 +120,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `no_Run`. Did you mean `no_run`?
+error: unknown attribute `no_Run`
--> $DIR/check-attr.rs:23:1
|
LL | / /// foobar
@@ -127,9 +135,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `test-harness`. Did you mean `test_harness`?
+error: unknown attribute `test-harness`
--> $DIR/check-attr.rs:33:1
|
LL | / /// b
@@ -141,9 +150,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
--> $DIR/check-attr.rs:33:1
|
LL | / /// b
@@ -155,9 +165,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
-error: unknown attribute `teSt_harness`. Did you mean `test_harness`?
+error: unknown attribute `teSt_harness`
--> $DIR/check-attr.rs:33:1
|
LL | / /// b
@@ -169,7 +180,50 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
-error: aborting due to 12 previous errors
+error: unknown attribute `rust2018`
+ --> $DIR/check-attr.rs:43:1
+ |
+LL | / /// b
+LL | |
+LL | | ///
+LL | | /// ```rust2018
+LL | | /// boo
+LL | | /// ```
+ | |_______^
+ |
+ = help: there is an attribute with a similar name: `edition2018`
+
+error: unknown attribute `rust2018`
+ --> $DIR/check-attr.rs:51:1
+ |
+LL | / /// b
+LL | |
+LL | |
+LL | | ///
+LL | | /// ```rust2018 shouldpanic
+LL | | /// boo
+LL | | /// ```
+ | |_______^
+ |
+ = help: there is an attribute with a similar name: `edition2018`
+
+error: unknown attribute `shouldpanic`
+ --> $DIR/check-attr.rs:51:1
+ |
+LL | / /// b
+LL | |
+LL | |
+LL | | ///
+LL | | /// ```rust2018 shouldpanic
+LL | | /// boo
+LL | | /// ```
+ | |_______^
+ |
+ = help: there is an attribute with a similar name: `should_panic`
+ = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
+
+error: aborting due to 15 previous errors
diff --git a/tests/rustdoc-ui/lints/check-fail.stderr b/tests/rustdoc-ui/lints/check-fail.stderr
index f05e457af..99b01bac5 100644
--- a/tests/rustdoc-ui/lints/check-fail.stderr
+++ b/tests/rustdoc-ui/lints/check-fail.stderr
@@ -22,7 +22,7 @@ note: the lint level is defined here
LL | #![deny(rustdoc::missing_doc_code_examples)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
--> $DIR/check-fail.rs:8:1
|
LL | / //! ```rust,testharness
@@ -31,6 +31,7 @@ LL | | //! let x = 12;
LL | | //! ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
note: the lint level is defined here
--> $DIR/check-fail.rs:6:9
@@ -39,7 +40,7 @@ LL | #![deny(rustdoc::all)]
| ^^^^^^^^^^^^
= note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(rustdoc::all)]`
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
--> $DIR/check-fail.rs:17:1
|
LL | / /// hello
@@ -50,6 +51,7 @@ LL | | /// let x = 12;
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
error: aborting due to 4 previous errors
diff --git a/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr b/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
index 0867b0818..24597f09d 100644
--- a/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(missing_docs)]
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/lints/doc-spotlight.stderr b/tests/rustdoc-ui/lints/doc-spotlight.stderr
index 58612327f..5d93b4132 100644
--- a/tests/rustdoc-ui/lints/doc-spotlight.stderr
+++ b/tests/rustdoc-ui/lints/doc-spotlight.stderr
@@ -15,5 +15,5 @@ LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
index b8a08e943..f18824006 100644
--- a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
+++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unknown_lints)]
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
index fb3a5e415..3a748335e 100644
--- a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
+++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
@@ -8,5 +8,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::missing_crate_level_docs)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error