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

Reduce code duplication by replacing ty_nil with ty_tup(~[]). #10784

Closed
eddyb opened this issue Dec 3, 2013 · 2 comments
Closed

Reduce code duplication by replacing ty_nil with ty_tup(~[]). #10784

eddyb opened this issue Dec 3, 2013 · 2 comments

Comments

@eddyb
Copy link
Member

eddyb commented Dec 3, 2013

I've hit this while working on #10769, where I would need to change ast::ty_nil (and all the code using it) for consistency's sake and a great total of one usecase, a noop ..().

The only problem I see with ty_tup(~[]) is the possibility of heap allocation.
If that's a reason for concern, this can wait for the proposed changes to vectors, where ~[] would be represented as (0u, 0u).

@thestinger
Copy link
Contributor

Empty vectors no longer require heap allocations, so that's no longer an issue.

@ghost
Copy link

ghost commented Nov 4, 2014

Closing as a dupe of #18614.

@ghost ghost closed this as completed Nov 4, 2014
This issue was closed.
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

2 participants