Skip to content
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

libstd: Change all ~fn()s to procs in the standard library. #10554

Closed
wants to merge 1 commit into from

Conversation

pcwalton
Copy link
Contributor

This makes Cells no longer necessary in most cases.

r? @alexcrichton

if enlist_success {
if indestructible {
do unkillable { f() }
do unkillable { f_cell.take()() }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aww I thought proc was supposed to remove cells :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unkillable needs to become RAII. Then we can remove the cell.

@alexcrichton
Copy link
Member

r=me with the leak fixed

This makes `Cell`s no longer necessary in most cases.
@huonw
Copy link
Member

huonw commented Nov 19, 2013

I think this landed as #10561, closing to save on bors work.

@huonw huonw closed this Nov 19, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 6, 2023
…r=Jarcho

Make redundant_async_block a more complete late pass

This lets us detect more complex situations: `async { x.await }` is simplified into `x` if:

- `x` is an expression without side-effect
- or `x` is an `async` block itself

In both cases, no part of the `async` expression can be part of a macro expansion.

Fixes rust-lang#10509.
Fixes rust-lang#10525.

changelog: [`redundant_async_block`] Do not lint expressions with side effects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants