We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe7cfaa commit 1b88aceCopy full SHA for 1b88ace
tests/ui/borrowck/alias-liveness/higher-ranked.rs
@@ -0,0 +1,16 @@
1
+// check-pass
2
+
3
+trait Captures<'a> {}
4
+impl<T> Captures<'_> for T {}
5
6
+trait Outlives<'a>: 'a {}
7
+impl<'a, T: 'a> Outlives<'a> for T {}
8
9
+// Test that we treat `for<'a> Opaque: 'a` as `Opaque: 'static`
10
+fn test<'o>(v: &'o Vec<i32>) -> impl Captures<'o> + for<'a> Outlives<'a> {}
11
12
+fn statik() -> impl Sized {
13
+ test(&vec![])
14
+}
15
16
+fn main() {}
0 commit comments