blob: 1ea3e1d53ac2185d2dd7b46556a531dd2efcfdd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// This test ensures that the doctest will not use `#[allow(unused)]`.
//@ compile-flags:--test
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
/// Example
///
/// ```rust,no_run
/// trait T { fn f(); }
/// ```
pub fn f() {}
|