Skip to content

Move mutability from ty_vec and ty_trait to their respective stores. #13424

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

Merged
merged 4 commits into from
Apr 11, 2014

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Apr 9, 2014

Cleans up some remnants of the old mutability system and only allows vector/trait mutability in VstoreSlice (&mut [T]) and RegionTraitStore (&mut Trait).

@flaper87
Copy link
Contributor

@nikomatsakis you may be interested in looking at this PR.

@huonw
Copy link
Member

huonw commented Apr 10, 2014

I'm not totally sold on the generic Vstore<M = Mutability> thing. It's very nice for expressing that strings are immutable... but there's the (small) risk of things becoming generic and bloating code like crazy (see the bloat caused by making the pretty printer generic for an extreme example).

@huonw
Copy link
Member

huonw commented Apr 10, 2014

(And there's a few places where there's some mildly annoying duplication due to it. :( )

@nikomatsakis nikomatsakis self-assigned this Apr 10, 2014
@nikomatsakis
Copy link
Contributor

This looks pretty nice! btw, thanks for factoring things into their own commits, that was helpful.

@nikomatsakis
Copy link
Contributor

r+ from me once nits are fixed

@nikomatsakis nikomatsakis removed their assignment Apr 10, 2014
@eddyb
Copy link
Member Author

eddyb commented Apr 10, 2014

@huonw The pretty printer was causing bloat due to 4 (if I'm not mistaken) implementations in rustc.
There are only two possible instantiations of Vstore - anyways, all of this will be swept under the rug by DST :).

@brson
Copy link
Contributor

brson commented Apr 11, 2014

Failure looks legit.

bors added a commit that referenced this pull request Apr 11, 2014
Cleans up some remnants of the old mutability system and only allows vector/trait mutability in `VstoreSlice` (`&mut [T]`) and `RegionTraitStore` (`&mut Trait`).
@bors bors closed this Apr 11, 2014
@bors bors merged commit ee4c770 into rust-lang:master Apr 11, 2014
@eddyb eddyb deleted the ty-mut-in-store branch April 11, 2014 13:50
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