2019-06-12 10:18:32 -05:00
|
|
|
// check-pass
|
2016-01-07 12:51:16 -06:00
|
|
|
|
2016-01-02 03:57:55 -06:00
|
|
|
use std::marker::PhantomData;
|
|
|
|
|
|
|
|
pub trait Foo<P> {}
|
|
|
|
|
2016-01-07 12:51:16 -06:00
|
|
|
impl <P, T: Foo<P>> Foo<P> for Option<T> {}
|
2016-01-02 03:57:55 -06:00
|
|
|
|
|
|
|
pub struct Qux<T> (PhantomData<*mut T>);
|
|
|
|
|
|
|
|
impl<T> Foo<*mut T> for Option<Qux<T>> {}
|
|
|
|
|
|
|
|
pub trait Bar {
|
|
|
|
type Output: 'static;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T: 'static, W: Bar<Output = T>> Foo<*mut T> for W {}
|
|
|
|
|
2018-10-31 07:08:01 -05:00
|
|
|
fn main() {}
|