about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2023-01-15 05:52:22 +0900
committerYuki Okushi <jtitor@2k36.org>2023-01-15 05:52:22 +0900
commitcf5be0c3ac9ee3f6fb95a75d3ce8c75b6e771728 (patch)
treef61ce51bc18019ab7e160ea13bdc5a93b61f398c
parent4b51adf6ffa1ae2286ea436eb48cbaa8771886e6 (diff)
downloadrust-cf5be0c3ac9ee3f6fb95a75d3ce8c75b6e771728.tar.gz
rust-cf5be0c3ac9ee3f6fb95a75d3ce8c75b6e771728.zip
Add regression test for #42114
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
-rw-r--r--tests/ui/higher-rank-trait-bounds/issue-42114.rs20
1 files changed, 20 insertions, 0 deletions
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 00000000000..01515fdc9d2
--- /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();
+}