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

Refactor ty_vec - represent &[T] as &([T]) #13636

Merged
merged 1 commit into from
Apr 20, 2014
Merged

Conversation

nrc
Copy link
Member

@nrc nrc commented Apr 20, 2014

Refactors all uses of ty_vec and associated things to remove the vstore abstraction (still used for strings, for now). Pointers to vectors are stored as ty_rptr or ty_uniq wrapped around a ty_vec. There are no user-facing changes. Existing behaviour is preserved by special-casing many instances of pointers containing vectors. Hopefully with DST most of these hacks will go away. For now it is useful to leave them hanging around rather than abstracting them into a method or something.

Closes #13554.

Refactores all uses of ty_vec and associated things to remove the vstore abstraction (still used for strings, for now). Pointers to vectors are stored as ty_rptr or ty_uniq wrapped around a ty_vec. There are no user-facing changes. Existing behaviour is preserved by special-casing many instances of pointers containing vectors. Hopefully with DST most of these hacks will go away. For now it is useful to leave them hanging around rather than abstracting them into a method or something.

Closes rust-lang#13554.
bors added a commit that referenced this pull request Apr 20, 2014
Refactors all uses of ty_vec and associated things to remove the vstore abstraction (still used for strings, for now). Pointers to vectors are stored as ty_rptr or ty_uniq wrapped around a ty_vec. There are no user-facing changes. Existing behaviour is preserved by special-casing many instances of pointers containing vectors. Hopefully with DST most of these hacks will go away. For now it is useful to leave them hanging around rather than abstracting them into a method or something.

Closes #13554.
@bors bors closed this Apr 20, 2014
@bors bors merged commit 37306c1 into rust-lang:master Apr 20, 2014
@nrc nrc deleted the ty_vec branch April 20, 2014 22:29
@nrc
Copy link
Member Author

nrc commented Apr 20, 2014

I hope that once DST is finished some of the cases where we match on sty and special case say &([T]) can be treated as regular & which just recurses normally to hit the [T].

@eddyb
Copy link
Member

eddyb commented Apr 22, 2014

    ty_vec(mt, Option<uint>),

Ouch, I should have reviewed this, it reverted the mutability change (and who knows what else) :(.

@nrc
Copy link
Member Author

nrc commented Apr 22, 2014

@eddyb probably good for you to cast your eye over this still. Reverting the mutabilty change was deliberate since vstore no longer exists (for vecs, still there for strs for now), I couldn't keep mutability there.

@eddyb
Copy link
Member

eddyb commented Apr 22, 2014

But the mutability is in the ty_rptr that wraps the ty_vec.

flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 7, 2024
…ile, r=dswij

Extend `large_include_file` lint to also work on attributes

I realized randomly while working on another lint that `large_include_file` was not emitted on attributes. This PR fixes that.

changelog: Extend `large_include_file` lint to also work on attributes
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.

Refactor ty_vec, avoiding vstore
4 participants