Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. fn foo<T>(o: &mut Option<T>) {
  2. let _ = o.filter(|_| true);
  3. }
  4. fn main() {
  5. let x = &mut Some(1);
  6. foo(x);
  7. assert!(x.is_none());
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement