Add test for rustX codeblock attribute

This commit is contained in:
Guillaume Gomez 2023-12-12 14:27:35 +01:00
parent d3cb25f4cf
commit 98aa20b0a7
2 changed files with 20 additions and 1 deletions

View File

@ -39,3 +39,11 @@ pub fn foobar() {}
/// boo
/// ```
pub fn b() {}
/// b
//~^ ERROR
///
/// ```rust2018
/// boo
/// ```
pub fn c() {}

View File

@ -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