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 15 pull requests #77172

Merged
merged 40 commits into from
Sep 25, 2020
Merged

Rollup of 15 pull requests #77172

merged 40 commits into from
Sep 25, 2020

Conversation

jonas-schievink
Copy link
Contributor

Successful merges:

Failed merges:

r? @ghost

ecstatic-morse and others added 30 commits September 14, 2020 17:56
Make the following methods of `std::net::IpAddr` unstable const under the `const_ip` feature:
- `is_unspecified`
- `is_loopback`
- `is_global`
- `is_multicast`

Also adds a test for these methods in a const context.

Possible because these methods delegate to the inner `Ipv4Addr` or `Ipv6Addr`, which were made const, and the recent stabilization of const control flow.

Part of #76205
The double underscores were used to work around issue #12808, which was
solved in 2016.
…GuillaumeGomez

Use adaptive SVG favicon for rustdoc like other rust sites

Use the theme-adaptive SVG favicon that was recently introduced [for the Rust site](rust-lang/www.rust-lang.org#1185) (and others).

(This PR is simply copied from the PR linked above, so see that for rationale.)

Closes #72165.

Before, Firefox on Linux:

![image](https://user-images.githubusercontent.com/13814214/89971811-34c0a900-dc2a-11ea-9aa6-a4aa9d66bed4.png)

After, Firefox on Linux (`prefers-color-scheme` set to `dark` by setting `ui.systemUsesDarkTheme` to a number value of `1` in `about:config`):

![image](https://user-images.githubusercontent.com/13814214/89971842-515ce100-dc2a-11ea-92e8-c374aaaf6031.png)
Make delegation methods of `std::net::IpAddr` unstably const

Make the following methods of `std::net::IpAddr` unstable const under the `const_ip` feature:
 - `is_unspecified`
 - `is_loopback`
 - `is_global`
 - `is_multicast`

Also adds a test for these methods in a const context.

Possible because these methods delegate to the inner `Ipv4Addr` or `Ipv6Addr`, which were made const ([PR#76205](#76142) and [PR#76206](#76206)), and the recent stabilization of const control flow.

Part of #76205

r? @ecstatic-morse
Allow a unique name to be assigned to dataflow graphviz output

Previously, if the same analysis were invoked multiple times in a single compilation session, the graphviz output for later runs would overwrite that of previous runs. Allow callers to add a unique identifier to each run so this can be avoided.
Documented From impls in std/sync/mpsc/mod.rs

This is for #51430.

r? @steveklabnik
Liballoc bench vec use mem take not replace
Typo fix: "satsify" -> "satisfy"
add array::from_ref

mirrors the methods in `std::slice` with the same name.

I guess this method previously didn't exist as there was close to no reason to create an array of size `1`.
This will change due to const generics in the near future.
Don't use an if guard to check equality with a constant

Match on it directly instead
Use `Self` in docs when possible

Fixes #76542.

I used `rg '\s*//[!/]\s+fn [\w_]+\(&?self, ' .` in `library/` to find instances, I found some with that and some by manually checking.

@rustbot modify labels: C-enhancement T-doc
Merge two almost identical match arms
Updated html_root_url for compiler crates

Closes #77103

r? @jyn514
Suggest `const_mut_refs`, not `const_fn` for mutable references in `const fn`

Resolves #77134.

Prior to #76850, most uses of `&mut` in `const fn` ~~required~~ involved two feature gates, `const_mut_refs` and `const_fn`. The first allowed all mutable borrows of locals. The second allowed only locals, arguments and return values whose types contained `&mut`. I switched the second check to the `const_mut_refs` gate. However, I forgot update the error message with the new suggestion.

Alternatively, we could revert to having two different feature gates for this. OP's code never borrows anything mutably, so it didn't need `const_mut_refs` in the past, only `const_fn`. I'd prefer to keep everything under a single gate, however.

r? @oli-obk
…, r=oli-obk

Suggest `const_fn_transmute`, not `const_fn`

More fallout from #76850 in the vein of #77134. The fix is the same. I looked through the structured errors file and didn't see any more of this kind of diagnostics bug.

r? @oli-obk
…scores, r=Mark-Simulacrum

Remove workaround for deref issue that no longer exists.

The double underscores were used to work around issue #12808, which was solved in 2016.
@jonas-schievink
Copy link
Contributor Author

@bors r+ rollup=never p=15

@bors
Copy link
Contributor

bors commented Sep 25, 2020

📌 Commit 8515efb has been approved by jonas-schievink

@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 Sep 25, 2020
@jonas-schievink
Copy link
Contributor Author

@rustbot modify labels: rollup

@rustbot rustbot added the rollup A PR which is a rollup label Sep 25, 2020
@bors
Copy link
Contributor

bors commented Sep 25, 2020

⌛ Testing commit 8515efb with merge 5bfeee5...

@bors
Copy link
Contributor

bors commented Sep 25, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: jonas-schievink
Pushing 5bfeee5 to master...

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.