summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/doctest/display-output.rs
blob: 7a26dbff98613561ef541b3d59c16702378e73be (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/doctest" -> "$$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() {}