2015-02-12 05:16:02 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
trait Get<T> : 'static {
|
|
|
|
fn get(&self, t: T) -> T;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_min_from_max<'min, 'max>(v: Box<Get<&'max i32>>)
|
|
|
|
-> Box<Get<&'min i32>>
|
|
|
|
where 'max : 'min
|
|
|
|
{
|
2017-05-02 21:25:15 -04:00
|
|
|
v //~ ERROR mismatched types
|
2015-02-12 05:16:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn get_max_from_min<'min, 'max, G>(v: Box<Get<&'min i32>>)
|
|
|
|
-> Box<Get<&'max i32>>
|
|
|
|
where 'max : 'min
|
|
|
|
{
|
2017-05-02 21:25:15 -04:00
|
|
|
v //~ ERROR mismatched types
|
2015-02-12 05:16:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|