2024-06-19 08:54:08 -05:00
|
|
|
//@ check-pass
|
|
|
|
//@ compile-flags: --test --test-args=--test-threads=1 -Zunstable-options --edition 2024
|
|
|
|
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
2024-07-12 04:26:25 -05:00
|
|
|
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
|
|
|
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
2024-06-19 08:54:08 -05:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// let x = 12;
|
|
|
|
/// ```
|
|
|
|
///
|
2024-07-11 16:37:55 -05: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 08:54:08 -05:00
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// macro_rules! bla {
|
|
|
|
/// () => {{
|
|
|
|
/// $crate::foo();
|
|
|
|
/// }}
|
|
|
|
/// }
|
|
|
|
///
|
|
|
|
/// fn foo() {}
|
|
|
|
///
|
|
|
|
/// fn main() {
|
|
|
|
/// bla!();
|
|
|
|
/// }
|
|
|
|
/// ```
|
|
|
|
pub struct Foo;
|