]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / lifetimes / issue-70917-lifetimes-in-fn-def.rs
1 // check-pass
2
3 fn assert_static<T: 'static>(_: T) {}
4
5 // NOTE(eddyb) the `'a: 'a` may look a bit strange, but we *really* want
6 // `'a` to be an *early-bound* parameter, otherwise it doesn't matter anyway.
7 fn capture_lifetime<'a: 'a>() {}
8
9 fn test_lifetime<'a>() {
10     assert_static(capture_lifetime::<'a>);
11 }
12
13 fn main() {}