Repository navigation
Abort instead of UB when unwinding out of a .use - #165060
Jules-Bertholet wants to merge 1 commit into
Conversation
|
cc @rust-lang/miri |
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
a6e452e to
3ae40aa
Compare
This comment has been minimized.
This comment has been minimized.
3ae40aa to
f328eb5
Compare
This comment has been minimized.
This comment has been minimized.
f328eb5 to
bff9d0e
Compare
This comment has been minimized.
This comment has been minimized.
bff9d0e to
7a778fd
Compare
Given that we unwind out of drop because there was strong pushback against silently turning unwinds into aborts, I don't think this is a good idea. It's certainly unprecedented and needs careful t-lang consideration. |
|
So: I think we ought to just remove Part of what has made me lose interest is that I expect fewer and fewer Rust users to be manually authoring Rust code, so my main interest is in syntax that makes the runtime semantics clear and which isn't distracting when reading the code. I find the existing I had not yet proposed removing That said, I generally would like to abort on unwind here. My preference would be to also abort on unwind from destructors and probably built-in operators like That said, I agree with @RalfJung that just aborting here is kind of inconsistent, and as I'm writing about this, I realize that e.g. |
|
@nikomatsakis Personally, I still like |
|
Closing in favor of #165111 |
Fixes #164902.
I've taken the liberty of making this abort instead of unwind.
.useclones are supposed to be cheap and side-effect-free, I think not unwinding should be part of that.@rustbot label F-ergonomic_clones A-panic