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

Rollup of 8 pull requests #67356

Merged
merged 22 commits into from
Dec 16, 2019
Merged

Rollup of 8 pull requests #67356

merged 22 commits into from
Dec 16, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Dec 16, 2019

Successful merges:

Failed merges:

r? @ghost

ranma42 and others added 22 commits December 11, 2019 21:24
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.
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.
@Centril
Copy link
Contributor Author

Centril commented Dec 16, 2019

@bors r+ p=200 rollup=never

@bors
Copy link
Contributor

bors commented Dec 16, 2019

📌 Commit 733559b has been approved by Centril

@bors
Copy link
Contributor

bors commented Dec 16, 2019

🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 16, 2019
@Centril Centril added the rollup A PR which is a rollup label Dec 16, 2019
@bors
Copy link
Contributor

bors commented Dec 16, 2019

⌛ Testing commit 733559b with merge 99b8953...

bors added a commit that referenced this pull request Dec 16, 2019
Rollup of 8 pull requests

Successful merges:

 - #67249 (Improve code generated for `starts_with(<literal char>)`)
 - #67308 (Delete flaky test net::tcp::tests::fast_rebind)
 - #67318 (Improve typeck & lowering docs for slice patterns)
 - #67322 (use Self alias in place of macros)
 - #67323 (make transparent enums more ordinary)
 - #67336 (Fix JS error when loading page with search)
 - #67344 (.gitignore: Don't ignore a file that exists in the repository)
 - #67349 (Minor: update Unsize docs for dyn syntax)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Dec 16, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 99b8953 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 16, 2019
@bors bors merged commit 733559b into rust-lang:master Dec 16, 2019
@Centril Centril deleted the rollup-paaw3ju branch December 17, 2019 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants