summary refs log tree commit diff
path: root/tests/rustdoc-ui/doctest/dead-code-module.rs
blob: f825749a6a25a454a02b12ab4022c53791b2d5e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Same test as dead-code but inside a module.

//@ edition: 2024
//@ compile-flags:--test
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101

mod my_mod {
    #![doc(test(attr(allow(unused_variables), deny(warnings))))]

    /// Example
    ///
    /// ```rust,no_run
    /// trait T { fn f(); }
    /// ```
    pub fn f() {}
}