Skip to content

Commit 1b88ace

Browse files
One extra test for higher-ranked outlives
1 parent fe7cfaa commit 1b88ace

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)