]> git.lizzy.rs Git - rust.git/blob - src/test/ui/variance/variance-invariant-self-trait-match.rs
Sync rust-lang/portable-simd@5f49d4c8435a25d804b2f375e949cb25479f5be9
[rust.git] / src / test / ui / variance / variance-invariant-self-trait-match.rs
1 #![allow(dead_code)]
2
3 trait Get {
4     fn get(&self) -> Self;
5 }
6
7 fn get_min_from_max<'min, 'max, G>()
8     where 'max : 'min, &'max G : Get, G : 'max
9 {
10     impls_get::<&'min G>(); //~ ERROR mismatched types
11 }
12
13 fn get_max_from_min<'min, 'max, G>()
14     where 'max : 'min, &'min G : Get, G : 'min
15 {
16     impls_get::<&'max G>(); //~ ERROR mismatched types
17 }
18
19 fn impls_get<G>() where G : Get { }
20
21 fn main() { }