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

Finish removing inner-vector-mutability #4912

Closed
bstrie opened this issue Feb 13, 2013 · 1 comment
Closed

Finish removing inner-vector-mutability #4912

bstrie opened this issue Feb 13, 2013 · 1 comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Milestone

Comments

@bstrie
Copy link
Contributor

bstrie commented Feb 13, 2013

After #4908, there are very few places left in the compiler that are using [mut foo] rather than just [foo] (with mutability instead attached to either the slot or the pointer). Here are the steps need to completely remove it:

  1. Remove Dvec (core::dvec). Nowadays, ~[] should be sufficient to cover all uses of Dvec throughout the compiler. However, this is blocked on some work by @nikomatsakis to improve the borrow check.
  2. Remove the two remaining uses of of inner-vector-mutability from rustc::middle::liveness. This appears to require some fairly substantial changes to the surrounding code, which still uses structural records, argument modes, mutable struct fields, and oldmap. Other files in the vicinity of rustc::middle will also need to be changed. This task is also blocked on some work by nmatsakis to improve liveness.
  3. Go through src/test/compile-fail and determine which tests are testing vector mutability in general and which are just testing inner mutability. Update the former and delete the latter.
  4. Remove inner-vector-mutability from the parser.
@catamorphism
Copy link
Contributor

I think this can be closed. The parser errors out by calling obsolete() now when it sees inner vector mutability, unless I'm confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

2 participants