Skip to content

procs should implement Finally #10655

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

Closed
metajack opened this issue Nov 25, 2013 · 5 comments
Closed

procs should implement Finally #10655

metajack opened this issue Nov 25, 2013 · 5 comments

Comments

@metajack
Copy link
Contributor

~fn used to implement std::unstable::finally::Finally, but proc doesn't.

A test should also be added so this doesn't break again.

It appears that one workaround for this is to switch to extern "Rust" fn which does implement Finally.

@metajack
Copy link
Contributor Author

cc @bjz

@thestinger
Copy link
Contributor

Can we replace finally with scope guards?

@sfackler
Copy link
Member

@thestinger: @nikomatsakis mentioned on #9842 a month or so ago that there are some destructor soudness issues that need to be worked out to make scope guards work properly.

@thestinger
Copy link
Contributor

If we're not going to have stack-based once functions we need a scope keyword anyway.

@steveklabnik
Copy link
Member

Procs no longer exist, and it would seem that finally works with unboxed closures, so I'm giving this a close.

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

No branches or pull requests

4 participants