about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2022-11-23 14:34:11 +0800
committeryukang <moorekang@gmail.com>2022-11-23 15:17:00 +0800
commitb0d39c6ed039afde82abc40cd830d546a3434d37 (patch)
tree14f018f70f0a7dc618a2bfaa4156c4402955406c /src
parent11432fe952cdc531785bd1bf7dc4e8a15da6daab (diff)
downloadrust-b0d39c6ed039afde82abc40cd830d546a3434d37.tar.gz
rust-b0d39c6ed039afde82abc40cd830d546a3434d37.zip
Fix #104639, find the right lower bound region in the scenario of partial order relations
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/borrowck/issue-104639-lifetime-order.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/borrowck/issue-104639-lifetime-order.rs b/src/test/ui/borrowck/issue-104639-lifetime-order.rs
new file mode 100644
index 00000000000..db1f8f8d588
--- /dev/null
+++ b/src/test/ui/borrowck/issue-104639-lifetime-order.rs
@@ -0,0 +1,10 @@
+// edition:2018
+// check-pass
+
+#![allow(dead_code)]
+async fn fail<'a, 'b, 'c>(_: &'static str) where 'a: 'c, 'b: 'c, {}
+async fn pass<'a, 'c, 'b>(_: &'static str) where 'a: 'c, 'b: 'c, {}
+async fn pass2<'a, 'b, 'c>(_: &'static str) where 'a: 'c, 'b: 'c, 'c: 'a, {}
+async fn pass3<'a, 'b, 'c>(_: &'static str) where 'a: 'b, 'b: 'c, 'c: 'a, {}
+
+fn main() { }