Skip to content

Rollup of 19 pull requests #78874

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 44 commits into from
Nov 8, 2020
Merged

Rollup of 19 pull requests #78874

merged 44 commits into from
Nov 8, 2020

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Nov 8, 2020

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

CDirkx and others added 30 commits September 2, 2020 02:35
Insta-stabilize the methods `is_ready` and `is_pending` of `Poll`.

Possible because of the recent stabilization of const control flow.

Also adds a test for these methods in a const context.
Due to the recent release of 1.47.0, this PR will be stabilized in 1.49.0 instead of 1.48.0.
This adds a binary called `x` in `src/tools/x`. All it does is check the
current directory and its ancestors for a file called `x.py`, and if it
finds one, runs it.

By installing x, you can easily `x.py` from any subdirectory.

It can be installed globally with `cargo install --path src/tools/x`
Also includes:
- Cell::into_inner
- RefCell::into_inner
- Atomic*::into_inner
Partially fix rust-lang#55002, deprecate in another release

Co-authored-by: Ashley Mannix <kodraus@hey.com>

Update stable version for stabilize_spin_loop

Co-authored-by: Joshua Nelson <joshua@yottadb.com>

Use better example for spinlock

As suggested by KodrAus

Remove renamed_spin_loop already available in master

Fix spin loop example
Includes:
- io::Cursor::new
- io::Cursor::get_ref
- io::Cursor::position
- io::empty
- io::repeat
- io::sink
Prior to this, setting the rustfmt configuration was ignored:

```
% mkdir example

% cd example

% ../configure --set build.rustfmt=/usr/bin/true

% ../x.py fmt
./x.py fmt is not supported on this channel
failed to run: /Users/shep/Projects/rust/example/build/bootstrap/debug/bootstrap fmt
Build completed unsuccessfully in 0:00:01
```

And after:

```
% ../x.py fmt
Build completed successfully in 0:00:11
```
The inlining integrator produces relatively verbose and uninteresting
logs.  Move them from a debug log level to a trace level, so that they
can be easily isolated from others.
fixed a typo and modified some line formatting justification while I'm here :)
Fixes rust-lang#78819

This extends the check for dereferences added in PR rust-lang#77324
to cover mutable borrows, as well as direct writes. If we're operating
on a dereference of a `const` item, we shouldn't be firing the lint.
…rAus

Stabilize hint::spin_loop

Partially fix rust-lang#55002, deprecate in another release

r? ``````@KodrAus``````
Stabilize `Poll::is_ready` and `is_pending` as const

Insta-stabilize the methods `is_ready` and `is_pending` of `std::task::Poll` as const, in the same way as [PR#76198](rust-lang#76198).

Possible because of the recent stabilization of const control flow.

Part of rust-lang#76225.
make concurrency helper more pleasant to read
…-size, r=jyn514

Remove FIXME comment in print_type_sizes ui test suite

## Overview
Helps with rust-lang#62277

> The type sizes are likely only printed when the actual layout is computed. For generic types, this only happens during codegen.

ref: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Codegen.20process.20question/near/215836807

Some tests like `multiple_types.rs` are passed even if using `check-pass`. But tests should be agnostic to when the actual layout is computed. The `build-pass` is intentionally used for them. I remove FIXME comments.
Use SOCK_CLOEXEC and accept4() on more platforms.

This PR enables the use of `SOCK_CLOEXEC` and `accept4` on more platforms.

-----

Android uses the linux kernel, so it should also support it.

DragonflyBSD introduced them in 4.4 (December 2015):
https://www.dragonflybsd.org/release44/

FreeBSD introduced them in 10.0 (January 2014):
https://wiki.freebsd.org/AtomicCloseOnExec

Illumos introduced them in a commit in April 2013, not sure when it was released. It is quite possible that is has always been in Illumos:
illumos/illumos-gate@5dbfd19
https://illumos.org/man/3socket/socket
https://illumos.org/man/3socket/accept4

NetBSD introduced them in 6.0 (Oktober 2012) and 8.0 (July 2018):
https://man.netbsd.org/NetBSD-6.0/socket.2
https://man.netbsd.org/NetBSD-8.0/accept.2

OpenBSD introduced them in 5.7 (May 2015):
https://man.openbsd.org/socket https://man.openbsd.org/accept
…lnay

Constantify `UnsafeCell::into_inner` and related

Tracking issue: rust-lang#78729

This PR constantifies:
- `UnsafeCell::into_inner`
- `Cell::into_inner`
- `RefCell::into_inner`
- `Atomic*::into_inner`

r? `````@dtolnay`````
Correct unsigned equivalent of isize to be usize

See [rust-lang#74913 (comment)](rust-lang#74913 (comment)) for why this matters. Apparently it hasn't been used anywhere else, though CI will tell for sure.
Make some std::io functions `const`

Tracking issue: rust-lang#78812

Make the following functions `const`:
- `io::Cursor::new`
- `io::Cursor::get_ref`
- `io::Cursor::position`
- `io::empty`
- `io::repeat`
- `io::sink`

r? `````@dtolnay`````
use single char patterns for split() (clippy::single_char_pattern)
…lcnr

Small cleanup in `TypeFoldable` derive macro

r? ```@lcnr```
…k-Simulacrum

Honor the rustfmt setting in config.toml

Prior to this, setting the rustfmt configuration was ignored:

```
% mkdir example

% cd example

% ../configure --set build.rustfmt=/usr/bin/true

% ../x.py fmt
./x.py fmt is not supported on this channel
failed to run: /Users/shep/Projects/rust/example/build/bootstrap/debug/bootstrap fmt
Build completed unsuccessfully in 0:00:01
```

And after:

```
% ../x.py fmt
Build completed successfully in 0:00:11
```

r? `@Mark-Simulacrum`
Less verbose debug logging from inlining integrator

The inlining integrator produces relatively verbose and uninteresting
logs.  Move them from a debug log level to a trace level, so that they
can be easily isolated from others.
Convert a bunch of intra-doc links

An intra-doc link bonanza!

This was accomplished using a bunch of trial-and-error with sed.
…ulacrum

rustc_resolve: Use `#![feature(format_args_capture)]`

This is the best new sugar for quite some time.

(I only changed places that already used named arguments.)
typo and formatting

fixed a typo and modified some line formatting justification while I'm here :)
…ow, r=varkor

Don't fire `CONST_ITEM_MUTATION` lint when borrowing a deref

Fixes rust-lang#78819

This extends the check for dereferences added in PR rust-lang#77324
to cover mutable borrows, as well as direct writes. If we're operating
on a dereference of a `const` item, we shouldn't be firing the lint.
@rustbot rustbot added the rollup A PR which is a rollup label Nov 8, 2020
@m-ou-se
Copy link
Member Author

m-ou-se commented Nov 8, 2020

@bors r+ p=19 rollup=never

@bors
Copy link
Collaborator

bors commented Nov 8, 2020

📌 Commit 91759b2 has been approved by m-ou-se

@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 Nov 8, 2020
@bors
Copy link
Collaborator

bors commented Nov 8, 2020

⌛ Testing commit 91759b2 with merge b1277d0...

@bors
Copy link
Collaborator

bors commented Nov 8, 2020

☀️ Test successful - checks-actions
Approved by: m-ou-se
Pushing b1277d0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 8, 2020
@bors bors merged commit b1277d0 into rust-lang:master Nov 8, 2020
@rustbot rustbot added this to the 1.49.0 milestone Nov 8, 2020
@rust-highfive
Copy link
Contributor

📣 Toolstate changed by #78874!

Tested on commit b1277d0.
Direct link to PR: #78874

🎉 rls on windows: build-fail → test-pass (cc @Xanewok).
🎉 rls on linux: build-fail → test-pass (cc @Xanewok).
🎉 rustfmt on windows: build-fail → test-pass (cc @topecongiro @calebcartwright).
🎉 rustfmt on linux: build-fail → test-pass (cc @topecongiro @calebcartwright).

@m-ou-se m-ou-se deleted the rollup-3jp1ijj branch November 8, 2020 16:15
rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Nov 8, 2020
Tested on commit rust-lang/rust@b1277d0.
Direct link to PR: <rust-lang/rust#78874>

🎉 rls on windows: build-fail → test-pass (cc @Xanewok).
🎉 rls on linux: build-fail → test-pass (cc @Xanewok).
🎉 rustfmt on windows: build-fail → test-pass (cc @topecongiro @calebcartwright).
🎉 rustfmt on linux: build-fail → test-pass (cc @topecongiro @calebcartwright).
# for free to join this conversation on GitHub. Already have an account? # 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.