Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct T(u32);
- fn by_value(_: T) {}
- fn by_ref(_: &T) {}
- fn main() {
- let z = T(123);
- let closure = || {
- by_ref(&z);
- by_value(z);
- };
- closure();
- by_value(z);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement