Skip to content

Commit

Permalink
Add test for rustX codeblock attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 12, 2023
1 parent d3cb25f commit 98aa20b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/rustdoc-ui/lints/check-attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ pub fn foobar() {}
/// boo
/// ```
pub fn b() {}

/// b
//~^ ERROR
///
/// ```rust2018
/// boo
/// ```
pub fn c() {}
13 changes: 12 additions & 1 deletion tests/rustdoc-ui/lints/check-attr.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,16 @@ LL | | /// ```
|
= 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`. Did you mean `edition2018`?
--> $DIR/check-attr.rs:43:1
|
LL | / /// b
LL | |
LL | | ///
LL | | /// ```rust2018
LL | | /// boo
LL | | /// ```
| |_______^

error: aborting due to 13 previous errors

0 comments on commit 98aa20b

Please sign in to comment.