2022-03-14 20:00:08 -05:00
|
|
|
// Test that `--show-output` has an effect and `allow(unused)` can be overridden.
|
2021-11-26 12:52:28 -06:00
|
|
|
|
2021-09-09 09:52:48 -05:00
|
|
|
// check-pass
|
2021-11-26 12:52:28 -06:00
|
|
|
// edition:2018
|
|
|
|
// compile-flags:--test --test-args=--show-output
|
2023-01-05 02:45:44 -06:00
|
|
|
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
2021-09-09 09:52:48 -05:00
|
|
|
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
|
|
|
|
|
|
|
/// ```
|
2021-11-26 12:52:28 -06:00
|
|
|
/// #![warn(unused)]
|
2021-09-09 09:52:48 -05:00
|
|
|
/// let x = 12;
|
2021-11-26 12:52:28 -06:00
|
|
|
///
|
2021-12-05 03:10:59 -06:00
|
|
|
/// fn foo(x: &dyn std::fmt::Display) {}
|
2021-09-09 09:52:48 -05:00
|
|
|
/// ```
|
|
|
|
pub fn foo() {}
|