rust/tests/ui/specialization/issue-35376.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
767 B
Rust
Raw Normal View History

// check-pass
2017-09-02 12:38:25 -05:00
#![feature(specialization)]
2020-06-16 03:06:35 -05:00
//~^ WARN the feature `specialization` is incomplete
2017-09-02 12:38:25 -05:00
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 = ();
}