From 38e0d58d7d67a4347b85ac26aa35df573df86621 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Fri, 28 Jul 2023 11:01:53 +0200 Subject: [PATCH] Add regression test for `--cap-lints allow` and trait bounds warning I have verified that the test fails if stderr begins to contain output by making sure the test fails when I add eprintln!("some output on stderr"); to the compiler (I added it to `fn build_session()`). --- tests/ui/lint/lint-cap-trait-bounds.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/ui/lint/lint-cap-trait-bounds.rs diff --git a/tests/ui/lint/lint-cap-trait-bounds.rs b/tests/ui/lint/lint-cap-trait-bounds.rs new file mode 100644 index 00000000000..d9c28dd0aa6 --- /dev/null +++ b/tests/ui/lint/lint-cap-trait-bounds.rs @@ -0,0 +1,8 @@ +// Regression test for https://github.com/rust-lang/rust/issues/43134 + +// check-pass +// compile-flags: --cap-lints allow + +type Foo = Option; + +fn main() {}