Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait Storable {
- fn do_nothing(&self) {}
- }
- struct ThingA {}
- struct ThingB {}
- impl Storable for ThingA {}
- fn main() {
- let thing_a = ThingA{};
- let thing_b = ThingB{};
- let who_knows: &Storable = &thing_a;
- let no_work: Storable = ThingB{};
- }
Add Comment
Please, Sign In to add comment