diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-29857.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-29857.rs b/src/test/ui/issues/issue-29857.rs new file mode 100644 index 000000000..6f4c5f45d --- /dev/null +++ b/src/test/ui/issues/issue-29857.rs @@ -0,0 +1,19 @@ +// check-pass + +use std::marker::PhantomData; + +pub trait Foo<P> {} + +impl <P, T: Foo<P>> Foo<P> for Option<T> {} + +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 {} + +fn main() {} |