Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Foo;
- fn test<'a>(a: &'a mut Foo) -> &'a mut Foo {
- loop {
- if foo(a).is_some() {
- return a;
- }
- }
- }
- fn foo<'a>(a: &'a mut Foo) -> Option<&'a mut Foo> {
- if rand::random::<bool>() { Some(a) } else { None }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement