Conversation

Jarkko Sakkinen

fallible drop would be a great addition for rust

I don't really ever use Drop trait for this reason.

#rust #rustlang
1
1
0

@jarkko
Yes, but what should happen if the drop fails? Should there be like a pontentially added implicit question-mark at the end of _every_ block? I think there are two more reasonable ways to handle a failed drop, either panic or (log and) ignore. And those are both easy to implement in the drop function as needed.

0
0
0