2022-08-17 21:13:37 -05:00
|
|
|
// Test various uses of structs with distinct variances to make sure
|
2015-02-12 04:16:02 -06:00
|
|
|
// they permit lifetimes to be approximated as expected.
|
|
|
|
|
|
|
|
#![allow(dead_code)]
|
2019-07-02 16:30:28 -05:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2015-02-12 04:16:02 -06:00
|
|
|
|
|
|
|
struct SomeStruct<T>(fn(T));
|
|
|
|
|
|
|
|
fn bar<'min,'max>(v: SomeStruct<&'min ()>)
|
|
|
|
-> SomeStruct<&'max ()>
|
|
|
|
where 'max : 'min
|
|
|
|
{
|
|
|
|
v
|
|
|
|
}
|
|
|
|
|
2018-10-31 07:08:01 -05:00
|
|
|
|
|
|
|
fn main() { }
|