2024-10-01 17:08:01 +02:00
|
|
|
// This test ensures that the doctest will not use `#[allow(unused)]`.
|
|
|
|
|
|
|
|
//@ compile-flags:--test
|
2024-12-25 22:12:17 +11:00
|
|
|
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
|
|
|
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
2024-10-01 17:08:01 +02:00
|
|
|
//@ failure-status: 101
|
|
|
|
|
|
|
|
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
|
|
|
|
|
|
|
|
/// Example
|
|
|
|
///
|
|
|
|
/// ```rust,no_run
|
|
|
|
/// trait T { fn f(); }
|
|
|
|
/// ```
|
|
|
|
pub fn f() {}
|