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 10 pull requests #60290

Closed
wants to merge 27 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Apr 25, 2019

Successful merges:

Failed merges:

r? @ghost

tmandry and others added 27 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
…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.
@Centril
Copy link
Contributor Author

Centril commented Apr 25, 2019

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Apr 25, 2019

📌 Commit e73c6f7 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 25, 2019
@Centril Centril closed this Apr 25, 2019
@Centril Centril deleted the rollup-gtvx22n branch April 25, 2019 22:23
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:0c2cfbf8:start=1556228218032630430,finish=1556228342819215173,duration=124786584743
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:24:07] 
[01:24:07] running 9 tests
[01:24:07] iiiiiiiii
[01:24:07] 
[01:24:07]  finished in 0.148
[01:24:07] travis_fold:end:test_assembly

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:24:23] 
[01:24:23] running 121 tests
[01:24:46] .iiiii...i.....i..i...i..i.i.i..i.ii...i.....i..i....i..........iiii..........i...ii...i.......ii.i. 100/121
[01:24:51] i.i......iii.i.....ii
[01:24:51] 
[01:24:51]  finished in 28.260
[01:24:51] travis_fold:end:test_debuginfo

---
[01:53:03] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0671 (line 11021) stdout ----
[01:53:03] error[E0671]: const parameters cannot depend on type parameters
[01:53:03]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:11022:25
[01:53:03]   |
[01:53:03] 3 | fn const_id<T, const N: T>() -> T {
[01:53:03]   |                         ^ const parameter depends on type parameter
[01:53:03] error[E0658]: const generics are unstable
[01:53:03]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:11022:22
[01:53:03]   |
[01:53:03]   |
[01:53:03] 3 | fn const_id<T, const N: T>() -> T {
[01:53:03]   |
[01:53:03]   = note: for more information, see https://github.com/rust-lang/rust/issues/44580
[01:53:03]   = help: add #![feature(const_generics)] to the crate attributes to enable
[01:53:03] 
---
[01:53:03] 
[01:53:03] 
[01:53:03] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:53:03] Build completed unsuccessfully in 0:40:46
[01:53:03] Makefile:48: recipe for target 'check' failed
[01:53:03] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:029d4806
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Apr 25 23:32:15 UTC 2019
---
travis_time:end:07e91521:start=1556235136697359428,finish=1556235136702259573,duration=4900145
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:00192032
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:033b914b
travis_time:start:033b914b
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0a13e4aa
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

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