summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/display-output.rs
blob: 23bc54e3cde1a6c67c47c134a12dabc20b21cfc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Test that `--show-output` has an effect and `allow(unused)` can be overridden.

// check-pass
// edition:2018
// compile-flags:--test --test-args=--show-output
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
/// #![warn(unused)]
/// let x = 12;
///
/// fn foo(x: &dyn std::fmt::Display) {}
/// ```
pub fn foo() {}