diff options
Diffstat (limited to 'tests/ui/specialization/issue-35376.rs')
-rw-r--r-- | tests/ui/specialization/issue-35376.rs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/ui/specialization/issue-35376.rs b/tests/ui/specialization/issue-35376.rs new file mode 100644 index 000000000..cc35213b9 --- /dev/null +++ b/tests/ui/specialization/issue-35376.rs @@ -0,0 +1,43 @@ +// check-pass +#![feature(specialization)] +//~^ WARN the feature `specialization` is incomplete + +fn main() {} + +pub trait Alpha<T> { } + +pub trait Beta { + type Event; +} + +pub trait Delta { + type Handle; + fn process(&self); +} + +pub struct Parent<A, T>(A, T); + +impl<A, T> Delta for Parent<A, T> +where A: Alpha<T::Handle>, + T: Delta, + T::Handle: Beta<Event = <Handle as Beta>::Event> { + type Handle = Handle; + default fn process(&self) { + unimplemented!() + } +} + +impl<A, T> Delta for Parent<A, T> +where A: Alpha<T::Handle> + Alpha<Handle>, + T: Delta, + T::Handle: Beta<Event = <Handle as Beta>::Event> { + fn process(&self) { + unimplemented!() + } +} + +pub struct Handle; + +impl Beta for Handle { + type Event = (); +} |