diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-12 19:41:09 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-12 19:41:09 +0100 |
| commit | 58327c10c5c7424352e4579bf793e9cfaf9733bc (patch) | |
| tree | c3c5aedd469edeea08c0bc5e7b33e64f5da1e2aa /tests/rustdoc-ui/lints | |
| parent | bb0fd665a88e0902847f118ec753bd51dbe05480 (diff) | |
| download | rust-58327c10c5c7424352e4579bf793e9cfaf9733bc.tar.gz rust-58327c10c5c7424352e4579bf793e9cfaf9733bc.zip | |
Add a test for a codeblock with multiple invalid attributes
Diffstat (limited to 'tests/rustdoc-ui/lints')
| -rw-r--r-- | tests/rustdoc-ui/lints/check-attr.rs | 9 | ||||
| -rw-r--r-- | tests/rustdoc-ui/lints/check-attr.stderr | 31 |
2 files changed, 39 insertions, 1 deletions
diff --git a/tests/rustdoc-ui/lints/check-attr.rs b/tests/rustdoc-ui/lints/check-attr.rs index 38f5b3851d0..3c06e6c076b 100644 --- a/tests/rustdoc-ui/lints/check-attr.rs +++ b/tests/rustdoc-ui/lints/check-attr.rs @@ -47,3 +47,12 @@ pub fn b() {} /// 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 c736fa8a91f..d640125ab51 100644 --- a/tests/rustdoc-ui/lints/check-attr.stderr +++ b/tests/rustdoc-ui/lints/check-attr.stderr @@ -196,5 +196,34 @@ LL | | /// ``` | = help: there is an attribute with a similar name: `edition2018` -error: aborting due to 13 previous errors +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 |
