Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSync Fork from Upstream Repo #103
Merged
Conversation
The comparison can be performed on the raw bytes, as the chars can only match if their UTF8 encoding matches. This avoids the `is_char_boundary` checks and translates to a straight `u8` slice comparison which is optimized to a memcmp or inline comparison where appropriate.
This enables constant folding when matching a literal char. Fixes rust-lang#41993.
.gitignore should not ignore files that exist in the repository. The ignore of .cargo applies to the committed .cargo directory used in an example: $ git ls-files --exclude-standard --ignored src/test/run-make/thumb-none-qemu/example/.cargo/config Explicitly un-ignore that file.
…-char, r=BurntSushi Improve code generated for `starts_with(<literal char>)` This PR includes two minor improvements to the code generated when checking for string prefix/suffix. The first commit simplifies the str/str operation, by taking advantage of the raw UTF-8 representation. The second commit replaces the current str/char matching logic with a char->str encoding and then the previous method. The resulting code should be equivalent in the generic case (one char is being encoded versus one char being decoded), but it becomes easy to optimize in the case of a literal char, which in most cases a developer might expect to be at least as simple as that of a literal string. This PR should fix rust-lang#41993
Delete flaky test net::tcp::tests::fast_rebind This test is unreliable for at least 3 users on two platforms: see rust-lang#57509 and rust-lang#51006. It was added 5 years ago in rust-lang#22015. Do we know whether this is testing something important that would indicate a bug in our implementation, or if it's fine to remove? r? @sfackler @alexcrichton because this somewhat resembles rust-lang#59018 Closes rust-lang#57509. Closes rust-lang#51006.
Improve typeck & lowering docs for slice patterns cc rust-lang#62254 r? @matthewjasper
…lett use Self alias in place of macros
make transparent enums more ordinary By recognizing that structs & unions have one variant, we can make the treatment of transparent enums less ad-hoc. cc rust-lang#60405 r? @davidtwco
…n-DPC Fix JS error when loading page with search For example when you load this page: https://doc.rust-lang.org/nightly/std/num/struct.NonZeroI8.html?search=foo, you get a nice JS error: ``` TypeError: ev is undefined ``` r? @kinnison
…ted-files, r=Dylan-DPC .gitignore: Don't ignore a file that exists in the repository .gitignore should not ignore files that exist in the repository. The ignore of .cargo applies to the committed .cargo directory used in an example: $ git ls-files --exclude-standard --ignored src/test/run-make/thumb-none-qemu/example/.cargo/config Explicitly un-ignore that file.
Minor: update Unsize docs for dyn syntax
Rollup of 8 pull requests Successful merges: - rust-lang#67249 (Improve code generated for `starts_with(<literal char>)`) - rust-lang#67308 (Delete flaky test net::tcp::tests::fast_rebind) - rust-lang#67318 (Improve typeck & lowering docs for slice patterns) - rust-lang#67322 (use Self alias in place of macros) - rust-lang#67323 (make transparent enums more ordinary) - rust-lang#67336 (Fix JS error when loading page with search) - rust-lang#67344 (.gitignore: Don't ignore a file that exists in the repository) - rust-lang#67349 (Minor: update Unsize docs for dyn syntax) Failed merges: r? @ghost
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.
sthagen commentedDec 17, 2019
No description provided.