2019-07-03 06:30:28 +09:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2018-09-03 22:24:11 +02:00
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
|
/// \__________pkt->size___________/ \_result->size_/ \__pkt->size__/
|
|
|
|
|
/// ```
|
|
|
|
|
pub fn foo() {}
|
2018-12-15 16:25:50 -05:00
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
|
/// |
|
|
|
|
|
/// LL | use foobar::Baz;
|
|
|
|
|
/// | ^^^^^^ did you mean `baz::foobar`?
|
|
|
|
|
/// ```
|
|
|
|
|
pub fn bar() {}
|
|
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
|
/// valid
|
|
|
|
|
/// ```
|
|
|
|
|
///
|
|
|
|
|
/// ```
|
|
|
|
|
/// \_
|
|
|
|
|
/// ```
|
|
|
|
|
///
|
|
|
|
|
/// ```text
|
|
|
|
|
/// "invalid
|
|
|
|
|
/// ```
|
|
|
|
|
pub fn valid_and_invalid() {}
|
|
|
|
|
|
|
|
|
|
/// 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() {}
|
|
|
|
|
|
|
|
|
|
/// Indented block start
|
|
|
|
|
///
|
|
|
|
|
/// code with bad syntax
|
|
|
|
|
/// \_
|
|
|
|
|
///
|
|
|
|
|
/// Indented block end
|
|
|
|
|
pub fn quux() {}
|
|
|
|
|
|
|
|
|
|
/// Unclosed fence
|
|
|
|
|
///
|
|
|
|
|
/// ```
|
|
|
|
|
/// slkdjf
|
|
|
|
|
pub fn xyzzy() {}
|
|
|
|
|
|
|
|
|
|
/// Indented code that contains a fence
|
|
|
|
|
///
|
|
|
|
|
/// ```
|
|
|
|
|
pub fn blah() {}
|
|
|
|
|
|
|
|
|
|
/// ```edition2018
|
|
|
|
|
/// \_
|
|
|
|
|
/// ```
|
|
|
|
|
pub fn blargh() {}
|
|
|
|
|
|
|
|
|
|
#[doc = "```"]
|
|
|
|
|
/// \_
|
|
|
|
|
#[doc = "```"]
|
|
|
|
|
pub fn crazy_attrs() {}
|
2019-08-19 15:19:26 +01:00
|
|
|
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// ```
|
|
|
|
|
pub fn empty_rust() {}
|
|
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
/// ```
|
|
|
|
|
pub fn empty_rust_with_whitespace() {}
|