Refactor ty_str to use a ~(str) representation.#13819
Closed
nrc wants to merge 1 commit intorust-lang:masterfrom
Closed
Refactor ty_str to use a ~(str) representation.#13819nrc wants to merge 1 commit intorust-lang:masterfrom
nrc wants to merge 1 commit intorust-lang:masterfrom
Conversation
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.
Member
There was a problem hiding this comment.
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.
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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.