-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Async drop fix for dropee from another crate (#140858) #141031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Async drop fix for dropee from another crate (#140858) #141031
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
r? oli-obk |
This comment has been minimized.
This comment has been minimized.
I don't think it's a problem. I don't see a way around this except making crates that have async drop enabled infecting all crates that depend on it to also have it enabled. If there's an easy way to warn/error about it that you can see and that you think would be good, we can add it, but otherwise please just add a test explaining it. |
688a1e9
to
7b2dcf2
Compare
@bors r+ rollup |
…ncy-fix, r=oli-obk Async drop fix for dropee from another crate (rust-lang#140858) Fixes rust-lang#140858. For `AsyncDestructor` impl def id was wrongly kept as a LocalDefId, which causes crash when dropee is declared in another crate. Also, potential problem found: when user crate drops type with async drop in dependency crate, and user crate doesn't enable `feature(async_drop)`, then sync drop version will be used. Is it a problem? Do we need some notification about such situations?
…ncy-fix, r=oli-obk Async drop fix for dropee from another crate (rust-lang#140858) Fixes rust-lang#140858. For `AsyncDestructor` impl def id was wrongly kept as a LocalDefId, which causes crash when dropee is declared in another crate. Also, potential problem found: when user crate drops type with async drop in dependency crate, and user crate doesn't enable `feature(async_drop)`, then sync drop version will be used. Is it a problem? Do we need some notification about such situations?
Fixes #140858.
For
AsyncDestructor
impl def id was wrongly kept as a LocalDefId, which causes crash when dropee is declared in another crate.Also, potential problem found:
when user crate drops type with async drop in dependency crate, and user crate doesn't enable
feature(async_drop)
, then sync drop version will be used.Is it a problem? Do we need some notification about such situations?