-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 9 pull requests #67352
Rollup of 9 pull requests #67352
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.
Make Layout::new const This seems like a reasonable change to make. If we don't provide `Layout::new::<T>` as `const`, then users can just instead do the more error prone `Layout::from_size_align_unchecked(mem::size_of::<T>(), mem::align_of::<T>())` for the same effect and an extra `unsafe { }` incantation.
…-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
@bors r+ p=9 rollup=never |
📌 Commit 175118f has been approved by |
🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened |
@bors p=200 |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
starts_with(<literal char>)
#67249 (Improve code generated forstarts_with(<literal char>)
)Failed merges:
r? @ghost