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

Sync Fork from Upstream Repo #103

Merged
merged 23 commits into from Dec 17, 2019
Merged

Sync Fork from Upstream Repo #103

merged 23 commits into from Dec 17, 2019

Conversation

@sthagen
Copy link
Owner

sthagen commented Dec 17, 2019

No description provided.

ranma42 and others added 23 commits Dec 11, 2019
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
@sthagen sthagen merged commit b8e483c into sthagen:master Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

9 participants
You can’t perform that action at this time.