]> git.proxmox.com Git - rustc.git/blob - src/test/ui/variance/variance-use-covariant-struct-2.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / variance / variance-use-covariant-struct-2.rs
1 // Test that a covariant struct permits the lifetime of a reference to
2 // be shortened.
3
4 #![allow(dead_code)]
5 // build-pass (FIXME(62277): could be check-pass?)
6
7 struct SomeStruct<T>(T);
8
9 fn foo<'min,'max>(v: SomeStruct<&'max ()>)
10 -> SomeStruct<&'min ()>
11 where 'max : 'min
12 {
13 v
14 }
15
16 fn main() { }