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 9 pull requests #114869

Closed
wants to merge 24 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

g0djan and others added 24 commits August 8, 2023 11:07
This lets us put a version on the impl, too.
…m-ou-se

Improve docs for impl Default for ExitStatus

This addresses a review comment in rust-lang#106425 (which is on the way to being merged I think).

Some of the other followup work is more complicated so I'm going to do individual MRs.

~~Note this branch is on top of rust-lang#106425~~
Point out expectation even if we have `TypeError::RegionsInsufficientlyPolymorphic`

just a minor tweak, since saying "one type is more general than the other" kinda sucks if we don't actually point out two types.
…r=cuviper

Optimizing the rest of bool's Ord implementation

After coming across issue rust-lang#66780, I realized that the other functions provided by Ord (`min`, `max`, and `clamp`) were similarly inefficient for bool. This change provides implementations for them in terms of boolean operators, resulting in much simpler assembly and faster code.
Fixes issue rust-lang#114653

[Comparison on Godbolt](https://rust.godbolt.org/z/5nb5P8e8j)

`max` assembly before:
```assembly
example::max:
        mov     eax, edi
        mov     ecx, eax
        neg     cl
        mov     edx, esi
        not     dl
        cmp     dl, cl
        cmove   eax, esi
        ret
```
`max` assembly after:
```assembly
example::max:
        mov     eax, edi
        or      eax, esi
        ret
```
`clamp` assembly before:
```assembly
example::clamp:
        mov     eax, esi
        sub     al, dl
        inc     al
        cmp     al, 2
        jae     .LBB1_1
        mov     eax, edi
        sub     al, sil
        movzx   ecx, dil
        sub     dil, dl
        cmp     dil, 1
        movzx   edx, dl
        cmovne  edx, ecx
        cmp     al, -1
        movzx   eax, sil
        cmovne  eax, edx
        ret
.LBB1_1:
        ; identical assert! code
```
`clamp` assembly after:
```assembly
example::clamp:
        test    edx, edx
        jne     .LBB1_2
        test    sil, sil
        jne     .LBB1_3
.LBB1_2:
        or      dil, sil
        and     dil, dl
        mov     eax, edi
        ret
.LBB1_3:
        ; identical assert! code
```
…provement, r=notriddle

Improve code readability by moving fmt args directly into the string

There are some of occurrences where I also transformed `write!(f, "{}", x)` into `f.write_str(x.as_str())`.

r? `@notriddle`
add missing feature(error_in_core)

Needed to fix feature gate errors in https://github.com/rust-lang/miri-test-libstd/actions/runs/5862810459/job/15895203359. I don't know how doctests are passing in-tree without this feature gate...
…lor-33, r=notriddle

Migrate GUI colors test to original CSS color format

Follow-up of rust-lang#111459.

r? ```@notriddle```
fix typo: affect -> effect

I just realized I made a silly typo when writing that comment...
@GuillaumeGomez
Copy link
Member Author

@bors r+ rollup=never p=9

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 15, 2023
@rustbot rustbot added the rollup A PR which is a rollup label Aug 15, 2023
@matthiaskrgr
Copy link
Member

2/3 already merged

@GuillaumeGomez GuillaumeGomez deleted the rollup-76priuy branch August 19, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants