mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 16:31:32 +00:00
14 lines
324 B
Rust
14 lines
324 B
Rust
//@ 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() {}
|