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 12 pull requests #86526

Closed
wants to merge 30 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Jethro Beekman and others added 30 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`
SocketAddr of Unix Sockets use sun_len as path's length in BSD-like OSes

- fixes rust-lang#69061
…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=12 rollup=never

@bors
Copy link
Contributor

bors commented Jun 21, 2021

📌 Commit 5f0aea3 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
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling hashbrown v0.11.0
   Compiling object v0.22.0
   Compiling miniz_oxide v0.4.0
   Compiling addr2line v0.14.0
error: cannot find macro `cfg_if` in this scope
    |
212 |             cfg_if! {
    |             ^^^^^^
    |
    |
    = note: consider importing this macro:
            cfg_if::cfg_if

error[E0425]: cannot find value `sun_len` in this scope
    |
    |
231 |             AddressKind::Pathname(OsStr::from_bytes(&path[..sun_len]).as_ref())

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0425`.

@JohnTitor
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 21, 2021
@JohnTitor JohnTitor closed this Jun 21, 2021
@JohnTitor JohnTitor deleted the rollup-3b1sa5s branch June 21, 2021 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.