blob: b9aab27142e312fa2aa55b0554a9d674d22e200d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// check-pass
fn assert_static<T: 'static>(_: T) {}
// NOTE(eddyb) the `'a: 'a` may look a bit strange, but we *really* want
// `'a` to be an *early-bound* parameter, otherwise it doesn't matter anyway.
fn capture_lifetime<'a: 'a>() {}
fn test_lifetime<'a>() {
assert_static(capture_lifetime::<'a>);
}
fn main() {}
|