From cf5be0c3ac9ee3f6fb95a75d3ce8c75b6e771728 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 15 Jan 2023 05:52:22 +0900 Subject: [PATCH] Add regression test for #42114 Signed-off-by: Yuki Okushi --- .../higher-rank-trait-bounds/issue-42114.rs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/ui/higher-rank-trait-bounds/issue-42114.rs diff --git a/tests/ui/higher-rank-trait-bounds/issue-42114.rs b/tests/ui/higher-rank-trait-bounds/issue-42114.rs new file mode 100644 index 0000000000000..01515fdc9d2bf --- /dev/null +++ b/tests/ui/higher-rank-trait-bounds/issue-42114.rs @@ -0,0 +1,20 @@ +// check-pass + +fn lifetime<'a>() +where + &'a (): 'a, +{ + /* do nothing */ +} + +fn doesnt_work() +where + for<'a> &'a (): 'a, +{ + /* do nothing */ +} + +fn main() { + lifetime(); + doesnt_work(); +}