Skip to content

Remove typestate from the language #2588

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
wants to merge 10 commits into from
Closed

Conversation

brson
Copy link
Contributor

@brson brson commented Jun 14, 2012

During our planning meeting today it sounded like the end is near, so here it is.

107 files changed, 105 insertions(+), 5342 deletions(-)

catamorphism and others added 10 commits June 13, 2012 10:46
Issue 2526 showed a test case where a library exported only a type
that was a synonym for a class. Because the class's destructor wasn't
getting marked as reachable, its linkage was wrongly getting set to
"internal". The solution is for reachability to traverse types.

Closes rust-lang#2526.
It was a little hard for me to believe, but it seems that re-exporting
an impl doesn't work at a, because encoder::encode_info_for_mod requires
that all the impls in the current module's impl map be local (that is,
bound to a value in the current crate's item map). Fixed it.

Closes rust-lang#2414.
@brson
Copy link
Contributor Author

brson commented Jun 14, 2012

Uh, this is based on whatever is on incoming right now. That's why there are so many unrelated commits.

@catamorphism
Copy link
Contributor

Is there anything wrong with simply leaving the code as it is and not advertising it as a feature, which is the conclusion I thought we came to in the meeting?

@brson
Copy link
Contributor Author

brson commented Jun 14, 2012

@catamorphism Last time I checked it was still taking 0.8s to typestate check rustc. I also just don't like having dead code around.

@marijnh
Copy link
Contributor

marijnh commented Jun 14, 2012

Agreed with @brson. Also, keeping the (huge) typestate code in sync when making changes is just not a very good use of people's time if it doesn't have a future anyway.

@graydon
Copy link
Contributor

graydon commented Jun 14, 2012

The conclusion in the meeting was "we need to have a separate actual conversation about typestate since it's a separate concern from the topic at hand". The 0.8s is not killing us presently, so let's think and talk a bit more carefully. I'm not comfortable with doing from "static-optimized DBC system" to "no DBC system" in a single step without being absolutely sure.

That said, bitrotting code in the compiler is a no-go. If it does wind up disabled, we should remove it.

@brson brson closed this Jun 15, 2012
celinval added a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
Update toolchain and remove dependency on line number since we match exact value only, this generate a lot of noise whenever we update the toolchain.
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.

6 participants