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 11 pull requests #86527

Merged
merged 28 commits into from
Jun 22, 2021
Merged

Rollup of 11 pull requests #86527

merged 28 commits into from
Jun 22, 2021

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Jethro Beekman and others added 28 commits May 7, 2021 23:49
This was erroneously changed in rust-lang#83387
Revert SGX inline asm syntax

This was erroneously changed in rust-lang#83387
…nTitor

Move `available_concurrency` implementation to `sys`

This splits out the platform-specific implementation of `available_concurrency` to the corresponding platforms under `sys`. No changes are made to the implementation.

Tidy didn't lint against this code being originally added outside of `sys` because of a bug (see rust-lang#84677), this PR also reverts the exclusion that was introduced in that bugfix.

Tracking issue of `available_concurrency`: rust-lang#74479
Add `io::Cursor::{remaining, remaining_slice, is_empty}`

Tracking issue: rust-lang#86369

I came across an inconvenience when answering the following [Stack Overflow](https://stackoverflow.com/questions/67831170) question.
To get the remaining slice you have to call `buff.fill_buf().unwrap()`. Which in my opinion doesn't really tell you what is returned (in the context of Cursor). To improve readability and convenience when using Cursor i propose adding the method `remaining`.

The next thing i found inconvenient (unnecessary long) was detecting if the cursor reached the end. There are a few ways this can be achieved right now:
- `buff.fill_buf().unwrap().is_empty()`
- `buff.position() >= buff.get_ref().len()`
- `buff.bytes().next().is_none()`

Which all seem a bit unintuitive, hidden in trait documentations or just a bit long for such a simple task.
Therefor i propose another method called `is_empty`, maybe with another name, since this one may leave room for interpretation on what really is empty (the underlying slice, the remaining slice or maybe the position).

Since it seemed easier to create this PR instead of an RFC i did that, if an RFC is wanted, i can close this PR and write an RFC first.
…r=yaahc

Reopen rust-lang#79692 (Format symbols under shared frames)

Reopening rust-lang#79692.
…Mark-Simulacrum

Allow to pass arguments to rustdoc-gui tool

Very convenient for testing. This is another part of rust-lang#86293

cc ``@jsha``
r? ``@Mark-Simulacrum``
…iases, r=jyn514

Resolve type aliases to the type they point to in intra-doc links

This feels a bit sketchy, but I think it's better than just rejecting the link.
Helps with rust-lang#86120, r? ``@jyn514``
Fix comment about rustc_inherit_overflow_checks in abs().
…ohnTitor

Add regression test for issue rust-lang#39161

Closes rust-lang#39161

Based on feedback from ``@JohnTitor`` in rust-lang#71333

r? ``@JohnTitor``
…r=Mark-Simulacrum

Remove `#[allow(unused_lifetimes)]` which is now unnecessary

Seems FP has been fixed, it doesn't need `#[allow(unused_lifetimes)]` anymore.
…ark-Simulacrum

Add regression test for issue rust-lang#54685

Closes rust-lang#54685

Took the test from rust-lang#54685 and modified it a bit to use assertion. Made sure that the updated test catches the original issue on 1.50 by running on Compiler Explorer (https://godbolt.org/z/E64onYeT5).
…twco

Say "this enum variant takes"/"this struct takes" instead of "this function takes"

This makes error messages for functions with incorrect argument counts adapt if they refer to a struct or enum variant:
```
error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:7:13
   |
LL |     let _ = Ok();
   |             ^^-- supplied 0 arguments
   |             |
   |             expected 1 argument

error[E0061]: this struct takes 1 argument but 0 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:8:13
   |
LL |     let _ = Wrapper();
   |             ^^^^^^^-- supplied 0 arguments
   |             |
   |             expected 1 argument
```

Fixes rust-lang#86481.
@rustbot rustbot added the rollup A PR which is a rollup label Jun 21, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=11 rollup=never

@bors
Copy link
Contributor

bors commented Jun 21, 2021

📌 Commit 4495ce7 has been approved by JohnTitor

@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 Jun 21, 2021
@bors
Copy link
Contributor

bors commented Jun 22, 2021

⌛ Testing commit 4495ce7 with merge 2c04f0b...

@bors
Copy link
Contributor

bors commented Jun 22, 2021

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing 2c04f0b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 22, 2021
@bors bors merged commit 2c04f0b into rust-lang:master Jun 22, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 22, 2021
@JohnTitor JohnTitor deleted the rollup-cbu78g4 branch June 22, 2021 04:20
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.