2024-06-19 13:54:08 +00:00
|
|
|
//@ check-pass
|
2024-11-22 15:20:22 +00:00
|
|
|
//@ edition: 2024
|
|
|
|
//@ compile-flags: --test --test-args=--test-threads=1
|
2024-12-25 11:12:17 +00:00
|
|
|
//@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR"
|
|
|
|
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
|
|
|
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
2024-06-19 13:54:08 +00:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// let x = 12;
|
|
|
|
/// ```
|
|
|
|
///
|
2024-07-11 21:37:55 +00:00
|
|
|
/// This one should not be a merged doctest (because of `$crate`). The output
|
|
|
|
/// will confirm it by displaying both merged and standalone doctest passes.
|
2024-06-19 13:54:08 +00:00
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// macro_rules! bla {
|
|
|
|
/// () => {{
|
|
|
|
/// $crate::foo();
|
|
|
|
/// }}
|
|
|
|
/// }
|
|
|
|
///
|
|
|
|
/// fn foo() {}
|
|
|
|
///
|
|
|
|
/// fn main() {
|
|
|
|
/// bla!();
|
|
|
|
/// }
|
|
|
|
/// ```
|
|
|
|
pub struct Foo;
|