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 17 pull requests #74223

Closed
wants to merge 48 commits into from

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

yoshuawuyts and others added 30 commits May 18, 2020 21:54
A function that has no prologue cannot be reasonably expected to support
debuginfo. In fact, the existing code (before this patch) would generate
invalid instructions that caused crashes. We can solve this easily by
just not emitting the debuginfo in this case.

Fixes rust-lang#42779
cc rust-lang#32408
This pulls in a fix for the install script on some tr(1) implementations,
as well as an update to use `anyhow` instead of `failure` for error
handling.
Suggested by @bjorn3

Every RUN command creates a new overlay on top of the image as of before
the RUN command. Using fewer RUN commands prevents intermediate overlays
(which in this case would have contained the entire Linux source tree).
When the dockerfiles were moved into the host-x86_64 directory, paths
for COPY commands were updated with the new host-x86_64/ prefix. This
suggested that the intended context was src/ci/docker. However, the context
for disabled docker images was src/ci/docker/host-x86_64. This broke the new
paths and prevented src/ci/docker/scripts from being included in the
context at all.

This commit corrects this context allowing docker to find the files it
needs for COPY commands.
It has a single call site and having it as a separate (higher-order!)
function makes the code harder to read.
This makes the two versions (parallel and non-parallel) more similar to
each other.
A couple of these are quite long, but they do a much better job of
explaining what they do, which was non-obvious before.
This commit replaces the use of `trim_start_matches`
because in `rustc -Vv` output there are no lines
starting with multiple "release:".
Add core::future::{poll_fn, PollFn}

This is a sibling PR to rust-lang#70834, adding `future::poll_fn`. This is a small helper function that helps bridge the gap between "poll state machines" and "async/await". It was first introduced in [[email protected]](https://docs.rs/futures/0.1.7/futures/future/fn.poll_fn.html) in December of 2016, and has been tried and tested as part of the ecosystem for the past 3.5 years.

## Implementation

Much of the same reasoning from rust-lang#70834 applies: by returning a concrete struct rather than an `async fn` we get to mark the future as `Unpin`. It also becomes named which allows storing it in structs without boxing. This implementation has been modified from the implementation in `futures-rs`.

## References
- [`futures::future::poll_fn`](https://docs.rs/futures/0.3.5/futures/future/fn.poll_fn.html)
- [`async_std::future::poll_fn`](https://docs.rs/async-std/1.5.0/async_std/future/fn.poll_fn.html)
Stabilize `transmute` in constants and statics but not const fn

cc rust-lang#53605 (leaving issue open so we can add `transmute` to `const fn` later)

Previous attempt: rust-lang#64011

r? @RalfJung

cc @rust-lang/wg-const-eval
…fJung

Stabilize casts and coercions to `&[T]` in const fn

Part of rust-lang#64992

There was never a reason to not stabilize this, we just accidentally prevented them when we implemented the `min_const_fn` feature that gave us `const fn` on stable. This PR stabilizes these casts (which are already stable in `const` outside `const fn`), while keeping all other unsizing casts (so `T` -> `dyn Trait`) unstable within const fn.
These casts have no forward compatibility concerns with any future features for const eval and users were able to use them under the `const_fn` feature gate already since at least the miri merger, possibly longer.

r? @rust-lang/lang
adjust ub-enum test to be endianess-independent

@cuviper noted that our test fails on "other" endianess systems (I never know which is which^^), so let's fix that.
Explain effects of debugging options from config.toml
…lacrum

Use str::strip* in bootstrap

This is technically a breaking change, replacing the use of `trim_start_matches` with `strip_prefix`. However, because in `rustc -Vv` output there are no lines starting with multiple "release:", this should go unnoticed in practice.
…atsakis

Only add CFGuard on `windows-msvc` targets

As @ollie27 pointed out in rust-lang#73893, the `cfguard` module flag causes incorrect behavior on `windows-gnu` targets. This patch restricts rustc to only add this flag for `windows-msvc` targets (this may need to be changed if other linkers gain support for CFGuard).
Suppress debuginfo on naked function arguments

A function that has no prologue cannot be reasonably expected to support
debuginfo. In fact, the existing code (before this patch) would generate
invalid instructions that caused crashes. We can solve this easily by
just not emitting the debuginfo in this case.

Fixes rust-lang#42779
cc rust-lang#32408
Avoid "whitelist"

Other terms are more inclusive and precise.
Update books

## book

3 commits in 4e7c00bece1544d409312ec93467beb62b5bd0cb..84a31397b34f9d405df44f2899ff17a4828dba18
2020-06-19 09:39:12 -0400 to 2020-07-04 10:50:18 -0500
- Update Windows install instructions (rust-lang/book#2389)
- Update ch01-02-hello-world.md (rust-lang/book#2386)
- bump mdbook version in github action (rust-lang/book#2380)

## reference

2 commits in 04d5d5d7ba624b6f5016298451f3a63d557f3260..0ea7bc494f1289234d8800bb9185021e0ad946f0
2020-06-16 15:08:05 -0700 to 2020-07-02 15:33:04 -0700
- Fix mis-capitalization of type name. (rust-lang/reference#844)
- Fix name of trait for array indexing. (rust-lang/reference#840)

## embedded-book

1 commits in 616962ad0dd80f34d8b802da038d0aed9dd691bb..94d9ea8460bcbbbfef1877b47cb930260b5849a7
2020-06-23 16:03:45 +0000 to 2020-07-05 14:17:40 +0000
- Note on transformation of static variables by attribute exception  (rust-embedded/book#251)

## rust-by-example

1 commits in 6f94ccb48da6fa4ed0031290f21411cf789f7d5e..229c6945a26a53a751ffa4f9cb418388c00029d3
2020-06-20 17:51:30 -0300 to 2020-07-06 10:13:15 -0300
- Modify comments (rust-lang/rust-by-example#1359)
…k-Simulacrum

Update rust-installer to latest version

This pulls in a fix for the install script on some tr(1) implementations,
as well as an update to use `anyhow` instead of `failure` for error
handling.
…nt, r=Mark-Simulacrum

Fix  disabled dockerfiles

When the dockerfiles were moved into the host-x86_64 directory, paths
for COPY commands were updated with the new host-x86_64/ prefix. This
suggested that the intended context was src/ci/docker. However, the context
for disabled docker images was src/ci/docker/host-x86_64. This broke the new
paths and prevented src/ci/docker/scripts from being included in the
context at all.

This commit corrects this context allowing docker to find the files it
needs for COPY commands.

Also includes a quick fix to riscv recommended by @bjorn3
…s, r=petrochenkov

Add a help to use `in_band_lifetimes` in nightly

Fixes rust-lang#73775
@Manishearth
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 10, 2020

📌 Commit da5ad59 has been approved by Manishearth

@rustbot rustbot added the rollup A PR which is a rollup label Jul 10, 2020
@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 Jul 10, 2020
@bors
Copy link
Contributor

bors commented Jul 10, 2020

⌛ Testing commit da5ad59 with merge 50d8561cc30683deb058834c3255c4a6e35d8ec1...

@bors
Copy link
Contributor

bors commented Jul 10, 2020

⌛ Testing commit da5ad59 with merge 0e53dedf5775d0fb96b748560c75af3e0ef3da96...

@bors
Copy link
Contributor

bors commented Jul 10, 2020

💔 Test failed - checks-actions

@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 Jul 10, 2020
@Manishearth
Copy link
Member Author

Ah, the const PRs failed a clippy test cc @oli-obk

@Manishearth Manishearth deleted the rollup-atmrokk branch July 18, 2020 01:14
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-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.