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_str to use a ~(str) representation. #13819

Closed
wants to merge 1 commit into from

Conversation

nrc
Copy link
Member

@nrc nrc commented Apr 28, 2014

Similar to my recent changes to ~[T]/&[T], these changes remove the vstore abstraction and represent str types as ~(str) and &(str). The Option in ty_str is the length of the string, None if the string is dynamically sized.

Similar to my recent changes to ~[T]/&[T], these changes remove the vstore abstraction and represent str types as ~(str) and &(str). The Option<uint> in ty_str is the length of the string, None if the string is dynamically sized.
@@ -4564,9 +4528,13 @@ pub fn hash_crate_independent(tcx: &ctxt, t: t, svh: &Svh) -> u64 {
byte!(6);
hash!(f);
}
ty_str(v) => {
ty_str(Some(_)) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt we actually want the fixed-length ty_str, but ignoring the length would make all str/N the same type.
I actually fixed a similar issue with fixed-length arrays which could lead to out of bounds accesses using Any.

@nrc nrc mentioned this pull request Apr 28, 2014
23 tasks
bors added a commit that referenced this pull request Apr 28, 2014
Similar to my recent changes to ~[T]/&[T], these changes remove the vstore abstraction and represent str types as ~(str) and &(str). The Option<uint> in ty_str is the length of the string, None if the string is dynamically sized.
@bors bors closed this Apr 28, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 15, 2024
…-lang#13819)

fix rust-lang#13818

The `arbitrary_source_item_ordering` lint does not exist in v1.82.0, so
I think it needs to be fixed.

changelog: [`arbitrary_source_item_ordering`]: corrected available
version information for this lint
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.

4 participants