2020-04-19 18:40:53 -05:00
|
|
|
// check-pass
|
2018-09-03 15:24:11 -05:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// \__________pkt->size___________/ \_result->size_/ \__pkt->size__/
|
|
|
|
/// ```
|
|
|
|
pub fn foo() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^^ WARNING could not parse code block as Rust code
|
2018-12-15 15:25:50 -06:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// |
|
|
|
|
/// LL | use foobar::Baz;
|
|
|
|
/// | ^^^^^^ did you mean `baz::foobar`?
|
|
|
|
/// ```
|
|
|
|
pub fn bar() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^^^^ WARNING could not parse code block as Rust code
|
2018-12-15 15:25:50 -06:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// valid
|
|
|
|
/// ```
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
///
|
|
|
|
/// ```text
|
|
|
|
/// "invalid
|
|
|
|
/// ```
|
|
|
|
pub fn valid_and_invalid() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^^^^^^ WARNING could not parse code block as Rust code
|
2018-12-15 15:25:50 -06:00
|
|
|
|
|
|
|
/// This is a normal doc comment, but...
|
|
|
|
///
|
|
|
|
/// There's a code block with bad syntax in it:
|
|
|
|
///
|
|
|
|
/// ```rust
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
///
|
|
|
|
/// Good thing we tested it!
|
|
|
|
pub fn baz() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^^^^ WARNING could not parse code block as Rust code
|
2018-12-15 15:25:50 -06:00
|
|
|
|
|
|
|
/// Indented block start
|
|
|
|
///
|
|
|
|
/// code with bad syntax
|
|
|
|
/// \_
|
|
|
|
///
|
|
|
|
/// Indented block end
|
|
|
|
pub fn quux() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^^^ could not parse code block as Rust code
|
2018-12-15 15:25:50 -06:00
|
|
|
|
|
|
|
/// Unclosed fence
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// slkdjf
|
|
|
|
pub fn xyzzy() {}
|
|
|
|
|
|
|
|
/// Indented code that contains a fence
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
pub fn blah() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^ WARNING could not parse code block as Rust code
|
2018-12-15 15:25:50 -06:00
|
|
|
|
|
|
|
/// ```edition2018
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
pub fn blargh() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^^ WARNING could not parse code block as Rust code
|
2018-12-15 15:25:50 -06:00
|
|
|
|
|
|
|
#[doc = "```"]
|
|
|
|
/// \_
|
|
|
|
#[doc = "```"]
|
|
|
|
pub fn crazy_attrs() {}
|
2021-04-26 08:11:08 -05:00
|
|
|
//~^^^^ WARNING could not parse code block
|
2019-08-19 09:19:26 -05:00
|
|
|
|
|
|
|
/// ```rust
|
|
|
|
/// ```
|
|
|
|
pub fn empty_rust() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^ WARNING Rust code block is empty
|
2019-08-19 09:19:26 -05:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
pub fn empty_rust_with_whitespace() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^^^ WARNING Rust code block is empty
|
2019-09-07 14:21:32 -05:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// let x = 1;
|
|
|
|
/// ```
|
|
|
|
///
|
|
|
|
/// \____/
|
|
|
|
///
|
|
|
|
pub fn indent_after_fenced() {}
|
2019-11-07 18:00:00 -06:00
|
|
|
//~^^^ WARNING could not parse code block as Rust code
|
2020-01-17 17:44:44 -06:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// "invalid
|
|
|
|
/// ```
|
|
|
|
pub fn invalid() {}
|
|
|
|
//~^^^^ WARNING could not parse code block as Rust code
|
2022-10-03 14:01:19 -05:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// fn wook_at_my_beautifuw_bwaces_plz() {);
|
|
|
|
/// ```
|
|
|
|
pub fn uwu() {}
|
|
|
|
//~^^^^ WARNING could not parse code block as Rust code
|