Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait A {
- fn hello(&self) { println!("hello"); }
- }
- struct B<C: A> {
- pub c: C
- }
- struct D;
- impl A for D {}
- fn main() {
- let x = B{c:D};
- x.c.hello();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement