diff options
| author | Martin Nordholts <enselic@gmail.com> | 2023-07-28 11:01:53 +0200 |
|---|---|---|
| committer | Martin Nordholts <enselic@gmail.com> | 2023-07-28 11:11:29 +0200 |
| commit | 38e0d58d7d67a4347b85ac26aa35df573df86621 (patch) | |
| tree | fc4ca897b1aec85ce55aa6dba9bdecc06b08e4e6 | |
| parent | a6236fa460811bbd4a08a94db249c344fa9f2220 (diff) | |
| download | rust-38e0d58d7d67a4347b85ac26aa35df573df86621.tar.gz rust-38e0d58d7d67a4347b85ac26aa35df573df86621.zip | |
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()`).
| -rw-r--r-- | tests/ui/lint/lint-cap-trait-bounds.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<T: Clone> = Option<T>; + +fn main() {} |
