rust/tests/rustdoc-ui/doctest/display-output.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
420 B
Rust
Raw Normal View History

2022-03-15 09:00:08 +08:00
// 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;
///
2021-12-05 17:10:59 +08:00
/// fn foo(x: &dyn std::fmt::Display) {}
/// ```
pub fn foo() {}