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

debuginfo: Recursive types and some trait object pointer support #9168

Merged
merged 8 commits into from
Sep 15, 2013

Conversation

michaelwoerister
Copy link
Member

This pull request finally adds support for recursive type definitions and provides a stub implementation for object pointers.

@jdm
Copy link
Contributor

jdm commented Sep 14, 2013

This looks good to me. Let's just see if we can avoid using @fn, since their future is in doubt.

@michaelwoerister
Copy link
Member Author

Let's just see if we can avoid using @fn, since their future is in doubt.

I've tried that but we can't use an &fn here because the struct containing the closure outlives the allocating stack frame. I tried using a ~fn but those can't capture span values (which contain managed pointers internally). Do you know of a way to the tell compiler that the ~fn does not need to be sendable?

All that being said, I think this will need a refactoring within the next few weeks anyway---so it might be OK to leave the @fn as is for now and get rid of it later as part of a bigger change.

@huonw
Copy link
Member

huonw commented Sep 14, 2013

It's possible to specific built-in trait bounds on a fn's environment with a colon: i.e. ~fn: (no bounds), ~fn:Send (the default), etc.

However, it still won't work, since ~fn: capturing @ makes things unhappy: #8983.

@jdm
Copy link
Contributor

jdm commented Sep 14, 2013

Very well. Fix up the nits and this is good to go!

@michaelwoerister
Copy link
Member Author

OK, I fixed the style issues and did a rebase.

@huonw Thanks for hint :)

@michaelwoerister
Copy link
Member Author

Sorry about that. Retry please...

@jdm
Copy link
Contributor

jdm commented Sep 15, 2013

Heh, every time. We should write a script that generates that list from the header file or something.

@michaelwoerister
Copy link
Member Author

Yeah :) I had a post-it on my monitor once about the xfail-win32 stuff, which did actually help...

bors added a commit that referenced this pull request Sep 15, 2013
This pull request finally adds support for recursive type definitions and provides a stub implementation for object pointers.
@bors bors closed this Sep 15, 2013
@bors bors merged commit 2ffe083 into rust-lang:master Sep 15, 2013
@michaelwoerister michaelwoerister deleted the traits branch February 7, 2022 09:28
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.

5 participants