Skip to content

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Aug 22, 2019

Successful merges:

Failed merges:

r? @ghost

tesuji and others added 21 commits August 21, 2019 00:37
…chenkov

When declaring a declarative macro in an item it's only accessible inside it

Fix rust-lang#63164.
r? @petrochenkov
…gisa

Use more optimal Ord implementation for integers

Closes rust-lang#63758
r? @nagisa

### Compare results

([godbolt link](https://godbolt.org/z/dsbczy))

Old assembly:
```asm
example::cmp1:
  mov eax, dword ptr [rdi]
  mov ecx, dword ptr [rsi]
  cmp eax, ecx
  setae dl
  add dl, dl
  add dl, -1
  xor esi, esi
  cmp eax, ecx
  movzx eax, dl
  cmove eax, esi
  ret
```

New assembly:
```asm
example::cmp2:
  mov eax, dword ptr [rdi]
  xor ecx, ecx
  cmp eax, dword ptr [rsi]
  seta cl
  mov eax, 255
  cmovae eax, ecx
  ret
```

Old llvm-mca statistics:
```
Iterations:        100
Instructions:      1100
Total Cycles:      243
Total uOps:        1300

Dispatch Width:    6
uOps Per Cycle:    5.35
IPC:               4.53
Block RThroughput: 2.2
```

New llvm-mca statistics:
```
Iterations:        100
Instructions:      700
Total Cycles:      217
Total uOps:        1100

Dispatch Width:    6
uOps Per Cycle:    5.07
IPC:               3.23
Block RThroughput: 1.8
```
…kinnison

Fix confusion in theme picker functions

To reproduce the bug currently: click on the theme picker button twice (to show it then hide it). Then click anywhere else: the dropdown menu appears again.

The problem was coming from a confusion of what the `hideThemeButtonState` and `showThemeButtonState` were supposed to do. I switched their codes and updated the `switchThemeButtonState` function. It now works as expected.

r? @kinnison
Tweak E0308 on opaque types

```
error[E0308]: if and else have incompatible types
  --> file.rs:21:9
   |
18 | /     if true {
19 | |         thing_one()
   | |         ----------- expected because of this
20 | |     } else {
21 | |         thing_two()
   | |         ^^^^^^^^^^^ expected opaque type, found a different opaque type
22 | |     }.await
   | |_____- if and else have incompatible types
   |
   = note: expected type `impl std::future::Future` (opaque type)
              found type `impl std::future::Future` (opaque type)
   = note: distinct uses of `impl Trait` result in different opaque types
   = help: if both futures resolve to the same type, consider `await`ing on both of them
```

r? @Centril
CC rust-lang#63167
Apply few Clippy suggestions

Somewhat follow-up of rust-lang#62806

Changes per commit are rather small so I can squash them if that's preferred.
@Centril
Copy link
Contributor Author

Centril commented Aug 22, 2019

@bors r+ p=7 rollup=never

@bors
Copy link
Collaborator

bors commented Aug 22, 2019

📌 Commit 3068064 has been approved by Centril

@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 Aug 22, 2019
@Centril
Copy link
Contributor Author

Centril commented Aug 22, 2019

@bors r+ p=7 rollup=never

@bors
Copy link
Collaborator

bors commented Aug 22, 2019

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Aug 22, 2019

📌 Commit 3068064 has been approved by Centril

@bors
Copy link
Collaborator

bors commented Aug 22, 2019

⌛ Testing commit 3068064 with merge 56be633...

bors added a commit that referenced this pull request Aug 22, 2019
Rollup of 7 pull requests

Successful merges:

 - #63624 (When declaring a declarative macro in an item it's only accessible inside it)
 - #63737 (Fix naming misspelling)
 - #63767 (Use more optimal Ord implementation for integers)
 - #63782 (Fix confusion in theme picker functions)
 - #63788 (Add amanjeev to rustc-guide toolstate)
 - #63796 (Tweak E0308 on opaque types)
 - #63805 (Apply few Clippy suggestions)

Failed merges:

r? @ghost
@bors
Copy link
Collaborator

bors commented Aug 22, 2019

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 22, 2019
@Centril
Copy link
Contributor Author

Centril commented Aug 22, 2019

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 22, 2019
@bors
Copy link
Collaborator

bors commented Aug 22, 2019

⌛ Testing commit 3068064 with merge 7602267...

bors added a commit that referenced this pull request Aug 22, 2019
Rollup of 7 pull requests

Successful merges:

 - #63624 (When declaring a declarative macro in an item it's only accessible inside it)
 - #63737 (Fix naming misspelling)
 - #63767 (Use more optimal Ord implementation for integers)
 - #63782 (Fix confusion in theme picker functions)
 - #63788 (Add amanjeev to rustc-guide toolstate)
 - #63796 (Tweak E0308 on opaque types)
 - #63805 (Apply few Clippy suggestions)

Failed merges:

r? @ghost
@bors
Copy link
Collaborator

bors commented Aug 22, 2019

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 22, 2019
@bors bors merged commit 3068064 into rust-lang:master Aug 22, 2019
@Centril Centril deleted the rollup-b8lo8ct branch August 22, 2019 22:17
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
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