From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/rustdoc-ui/display-output.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/rustdoc-ui/display-output.rs (limited to 'tests/rustdoc-ui/display-output.rs') diff --git a/tests/rustdoc-ui/display-output.rs b/tests/rustdoc-ui/display-output.rs new file mode 100644 index 000000000..23bc54e3c --- /dev/null +++ b/tests/rustdoc-ui/display-output.rs @@ -0,0 +1,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() {} -- cgit v1.2.3