Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait Foo {}
- trait Baz : Foo {
- fn baz();
- }
- struct A;
- struct B;
- struct C;
- impl Foo for A {}
- impl Foo for B {}
- impl Foo for C {}
- impl Baz for A {
- fn baz() {}
- }
- impl Baz for B {
- fn baz() {}
- }
- struct PlatformDependent<F: Foo>(F);
- impl<F: Baz> PlatformDependent<F>
- where
- {
- fn bar() {
- F::baz();
- }
- }
- /* No implementation for Platform C */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement