]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[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() {}