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 #60296

Merged
merged 34 commits into from
Apr 26, 2019
Merged

Rollup of 12 pull requests #60296

merged 34 commits into from
Apr 26, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Apr 26, 2019

Successful merges:

Failed merges:

r? @ghost

tmandry and others added 30 commits April 22, 2019 14:52
This was left over from when closure copy and clone were gated behind
feature flags.
Here, ExprKind::Use(P<Expr>) tweaks the drop order to act the
same way as '{ let _tmp = expr; _tmp }' does.
…ure, r=ollie27

Prevent failure in case no space left on device in rustdoc

Fixes rust-lang#59703.

r? @QuietMisdreavus
Set cfg(test) when rustdoc is running with --test option

Following a [discussion on twitter](https://twitter.com/burntsushi5/status/1117091914199785473), I proposed this change. What do you think about it?

r? @QuietMisdreavus

cc @BurntSushi
…nishearth

Fix index-page generation

Fixes rust-lang#60096.

The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons.

r? @rust-lang/rustdoc
Add Pin::{into_inner,into_inner_unchecked}

These functions are useful for unsafe code that needs to temporarily pull smart pointers out of the `Pin`, e.g. [the change that inspired them](Nemo157/futures-rs@b436178#diff-1a4e0ba4d1b539412ca576411ec6c7c2R258) is taking a `Pin<Box<dyn Future>>`, turning it into a `*mut dyn Future` via `Box::into_raw(unsafe { Pin::into_inner_unchecked(pin) })` then later dropping this via `drop(Pin::from(Box::from_raw(ptr)))`. This can be accomplished today via `{ let ptr = unsafe { Pin::get_unchecked_mut(pin.as_mut()) } as *mut dyn Future; mem::forget(pin); ptr }`, but this is far more complicated and loses out on the symmetry of using `Box::into_raw` and `Box::from_raw`.

I'll extend the documentation on what guarantees `into_inner_unchecked` needs to uphold once I get some feedback on whether this API is wanted or not.

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

Introduce hir::ExprKind::Use and employ in for loop desugaring.

In the `for $pat in $expr $block` desugaring we end with a `{ let _result = $match_expr; _result }` construct which makes `for` loops into a terminating scope and affects drop order. The construct was introduced in year 2015 by @pnkfelix in rust-lang#21984.

This PR replaces the construct with `hir::ExprKind::Use(P<hir::Expr>)` which is equivalent semantically but should hopefully be less costly in terms of compile time performance (to be determined).

This is extracted out of rust-lang@91b0abd from rust-lang#59288 for easier review and so that the perf implications wrt. `for`-loops can be measured.

r? @oli-obk
Implement Debug for Place using Place::iterate

r? @oli-obk
…, r=Centril

Derive Default instead of new in applicable lint

Closes rust-lang#60181

As far as I can see, at least within the `src/librustc_lint` directory this is the only place this is applicable.
…richton

Add feature-gate for f16c target feature

r? @alexcrichton
…=cramertj

Do not allow const generics to depend on type parameters

Fixes rust-lang#60264. In https://github.com/rust-lang/rust/pull/58191/files/b534cf992d0189032207f395c27ed092c89b40c7#diff-aeb0880081a991f34aef2ab889e1fb7a, it was suggested that there might be a better place for this error, but as this bug already affects stable, it's probably worth merging this now, and refactoring afterwards (I can open an issue for this).
Do not ICE when checking types against foreign fn

Fix rust-lang#60275.
… r=cramertj

Make `-Z allow-features` work for stdlib features

r? @cramertj
@Centril
Copy link
Contributor Author

Centril commented Apr 26, 2019

@bors r+ p=12

@bors
Copy link
Contributor

bors commented Apr 26, 2019

📌 Commit a133caa has been approved by Centril

@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 Apr 26, 2019
@bors
Copy link
Contributor

bors commented Apr 26, 2019

⌛ Testing commit a133caa with merge 180edc2...

bors added a commit that referenced this pull request Apr 26, 2019
Rollup of 12 pull requests

Successful merges:

 - #59734 (Prevent failure in case no space left on device in rustdoc)
 - #59940 (Set cfg(test) when rustdoc is running with --test option)
 - #60134 (Fix index-page generation)
 - #60165 (Add Pin::{into_inner,into_inner_unchecked})
 - #60183 (Chalkify: Add builtin Copy/Clone)
 - #60225 (Introduce hir::ExprKind::Use and employ in for loop desugaring.)
 - #60247 (Implement Debug for Place using Place::iterate)
 - #60259 (Derive Default instead of new in applicable lint)
 - #60267 (Add feature-gate for f16c target feature)
 - #60284 (Do not allow const generics to depend on type parameters)
 - #60285 (Do not ICE when checking types against foreign fn)
 - #60289 (Make `-Z allow-features` work for stdlib features)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Apr 26, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing 180edc2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 26, 2019
@bors bors merged commit a133caa into rust-lang:master Apr 26, 2019
@Centril Centril deleted the rollup-qh9la7k branch April 26, 2019 04:42
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #60296!

Tested on commit 180edc2.
Direct link to PR: #60296

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra).
💔 rls on windows: test-fail → build-fail (cc @Xanewok, @rust-lang/infra).
💔 rls on linux: test-fail → build-fail (cc @Xanewok, @rust-lang/infra).
💔 book on windows: test-pass → test-fail (cc @carols10cents @steveklabnik, @rust-lang/infra).
💔 book on linux: test-pass → test-fail (cc @carols10cents @steveklabnik, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Apr 26, 2019
Tested on commit rust-lang/rust@180edc2.
Direct link to PR: <rust-lang/rust#60296>

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra).
💔 rls on windows: test-fail → build-fail (cc @Xanewok, @rust-lang/infra).
💔 rls on linux: test-fail → build-fail (cc @Xanewok, @rust-lang/infra).
💔 book on windows: test-pass → test-fail (cc @carols10cents @steveklabnik, @rust-lang/infra).
💔 book on linux: test-pass → test-fail (cc @carols10cents @steveklabnik, @rust-lang/infra).
@carols10cents
Copy link
Member

i'm not sure why the book failed? I tried to look at the travis logs from bors here but all the jobs say they passed so i'm not sure where to see the problem?

@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
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.

None yet