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

Unsized rvalues: implement boxed closure impls. (2nd try) #59500

Merged
merged 12 commits into from Apr 5, 2019

Conversation

Projects
None yet
8 participants
@crlf0710
Copy link
Contributor

commented Mar 28, 2019

This is a rebase of S-blocked-closed PR #55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Mar 28, 2019

r? @QuietMisdreavus

(rust_highfive has picked a reviewer for you, use r? to override)

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

I don't know if i have this permission:
@bors try

@bors

This comment has been minimized.

Copy link
Contributor

commented Mar 28, 2019

@crlf0710: 🔑 Insufficient privileges: not in try users

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

@QuietMisdreavus

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

r? @rust-lang/compiler

I'll start the try build for you.

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

commented Mar 28, 2019

⌛️ Trying commit 3701ed0 with merge 1867821...

bors added a commit that referenced this pull request Mar 28, 2019

Auto merge of #59500 - crlf0710:boxed-closure-impls, r=<try>
Unsized rvalues: implement boxed closure impls. (2nd try)

This is a rebase of S-blocked-closed PR #55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.
@Centril

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

@Centril Centril added this to the 1.35 milestone Mar 28, 2019

@bors

This comment has been minimized.

Copy link
Contributor

commented Mar 28, 2019

☀️ Try build successful - checks-travis
Build commit: 1867821

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Mar 31, 2019

It seems bors try doesn't cover gnux32 arch? How can i run a test build that covers one?

@cramertj

This comment has been minimized.

Copy link
Member

commented Apr 1, 2019

I'm not sure if there's a way to do that-- maybe @alexcrichton or someone on @rust-lang/infra knows?

@kennytm

This comment has been minimized.

Copy link
Member

commented Apr 2, 2019

You could edit .travis.yml and change the "if" field for dist-various-2 to temporarily enable the the job in the CI.

@crlf0710 crlf0710 changed the title Unsized rvalues: implement boxed closure impls. (2nd try) [WIP]Unsized rvalues: implement boxed closure impls. (2nd try) Apr 2, 2019

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2019

OK, temporarily enabled dist-various-2 let's see how it goes.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 2, 2019

The job dist-various-2 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:15be574b:start=1554171762172935692,finish=1554171837710779949,duration=75537844257
$ 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
Setting environment variables from .travis.yml
---
[01:16:21]    Compiling alloc v0.0.0 (/checkout/src/liballoc)
[01:16:21]    Compiling rustc-demangle v0.1.10
[01:16:22]    Compiling panic_abort v0.0.0 (/checkout/src/libpanic_abort)
[01:16:27]    Compiling panic_unwind v0.0.0 (/checkout/src/libpanic_unwind)
[01:16:47] LLVM ERROR: Cannot emit physreg copy instruction
[01:16:47] error: Could not compile `std`.
[01:16:47] To learn more, run the command again with --verbose.
[01:16:47] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnux32" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[01:16:47] expected success, got: exit code: 101
[01:16:47] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --target x86_64-fuchsia,aarch64-fuchsia,sparcv9-sun-solaris,wasm32-unknown-unknown,wasm32-unknown-wasi,x86_64-sun-solaris,x86_64-unknown-linux-gnux32,x86_64-unknown-cloudabi,x86_64-fortanix-unknown-sgx,nvptx64-nvidia-cuda
---
travis_time:end:01c1025f:start=1554176457629802505,finish=1554176457635754400,duration=5951895
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0022b992
$ 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:19cac544
travis_time:start:19cac544
$ 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:08482c55
$ 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)

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2019

:( it seems the bug is still there. I'll try to seek for some help or some hint for investigation, but i don't think this will be in time for 1.35.

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Apr 3, 2019

Blocked on #59674

@Centril Centril removed this from the 1.35 milestone Apr 3, 2019

bors added a commit that referenced this pull request Apr 5, 2019

Auto merge of #59715 - Centril:rollup-qllcsxi, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #59500 (Unsized rvalues: implement boxed closure impls. (2nd try))
 - #59643 (std: Upgrade `compiler_builtins` to fix wasi linkage)
 - #59681 (Update cargo)
 - #59690 (Mark unix::ffi::OsStrExt methods as inline)
 - #59702 (Use declare_lint_pass! and impl_lint_pass! in more places)
 - #59712 (wasm32: Default to a "static" relocation model)

Failed merges:

r? @ghost
@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2019

@cramertj The code changes one test case borrowck output(which @qnighy already addressed). But there's a bootstrap test failure on homu. Are we running these tests using the bootstrapping compiler?(The output will be different)

What's the best way to deal with this? Are we able to disable a test during the bootstrap stage?

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2019

Also ping @pnkfelix for additional help.

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2019

It seems there's a nll-compare-mode on this specific runner (x86_64-gnu-nopt). Let me see if i can update the expected output for this mode.

@crlf0710 crlf0710 changed the title Unsized rvalues: implement boxed closure impls. (2nd try) [WIP] Unsized rvalues: implement boxed closure impls. (2nd try) Apr 5, 2019

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2019

@crlf0710 crlf0710 force-pushed the crlf0710:boxed-closure-impls branch from 30af9d6 to 812d89c Apr 5, 2019

@crlf0710 crlf0710 changed the title [WIP] Unsized rvalues: implement boxed closure impls. (2nd try) Unsized rvalues: implement boxed closure impls. (2nd try) Apr 5, 2019

@crlf0710

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2019

@cramertj Could you review the new changes and approve it again if there's no problem? Sorry for the inconvenience!

@cramertj

This comment has been minimized.

Copy link
Member

commented Apr 5, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

📌 Commit 812d89c has been approved by cramertj

Centril added a commit to Centril/rust that referenced this pull request Apr 5, 2019

Rollup merge of rust-lang#59500 - crlf0710:boxed-closure-impls, r=cra…
…mertj

Unsized rvalues: implement boxed closure impls. (2nd try)

This is a rebase of S-blocked-closed PR rust-lang#55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.

@Centril Centril referenced this pull request Apr 5, 2019

Closed

Rollup of 4 pull requests #59730

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

⌛️ Testing commit 812d89c with merge acd8dd6...

bors added a commit that referenced this pull request Apr 5, 2019

Auto merge of #59500 - crlf0710:boxed-closure-impls, r=cramertj
Unsized rvalues: implement boxed closure impls. (2nd try)

This is a rebase of S-blocked-closed PR #55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.
@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: cramertj
Pushing acd8dd6 to master...

@bors bors added the merged-by-bors label Apr 5, 2019

@bors bors merged commit 812d89c into rust-lang:master Apr 5, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
homu Test successful
Details

@jebrosen jebrosen referenced this pull request Apr 5, 2019

Closed

Remove uses of FnBox #851

@crlf0710 crlf0710 deleted the crlf0710:boxed-closure-impls branch Apr 6, 2019

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 31, 2019

rust: Update to 1.35.0.
Version 1.35.0 (2019-05-23)
==========================

Language
--------
- [`FnOnce`, `FnMut`, and the `Fn` traits are now implemented for `Box<FnOnce>`,
  `Box<FnMut>`, and `Box<Fn>` respectively.][59500]
- [You can now coerce closures into unsafe function pointers.][59580] e.g.
  ```rust
  unsafe fn call_unsafe(func: unsafe fn()) {
      func()
  }

  pub fn main() {
      unsafe { call_unsafe(|| {}); }
  }
  ```


Compiler
--------
- [Added the `armv6-unknown-freebsd-gnueabihf` and
  `armv7-unknown-freebsd-gnueabihf` targets.][58080]
- [Added the `wasm32-unknown-wasi` target.][59464]


Libraries
---------
- [`Thread` will now show its ID in `Debug` output.][59460]
- [`StdinLock`, `StdoutLock`, and `StderrLock` now implement `AsRawFd`.][59512]
- [`alloc::System` now implements `Default`.][59451]
- [Expanded `Debug` output (`{:#?}`) for structs now has a trailing comma on the
  last field.][59076]
- [`char::{ToLowercase, ToUppercase}` now
  implement `ExactSizeIterator`.][58778]
- [All `NonZero` numeric types now implement `FromStr`.][58717]
- [Removed the `Read` trait bounds
  on the `BufReader::{get_ref, get_mut, into_inner}` methods.][58423]
- [You can now call the `dbg!` macro without any parameters to print the file
  and line where it is called.][57847]
- [In place ASCII case conversions are now up to 4× faster.][59283]
  e.g. `str::make_ascii_lowercase`
- [`hash_map::{OccupiedEntry, VacantEntry}` now implement `Sync`
  and `Send`.][58369]

Stabilized APIs
---------------
- [`f32::copysign`]
- [`f64::copysign`]
- [`RefCell::replace_with`]
- [`RefCell::map_split`]
- [`ptr::hash`]
- [`Range::contains`]
- [`RangeFrom::contains`]
- [`RangeTo::contains`]
- [`RangeInclusive::contains`]
- [`RangeToInclusive::contains`]
- [`Option::copied`]

Cargo
-----
- [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom
  linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly
  platform specific.

Misc
----
- [The Rust toolchain is now available natively for musl based distros.][58575]

[59460]: rust-lang/rust#59460
[59464]: rust-lang/rust#59464
[59500]: rust-lang/rust#59500
[59512]: rust-lang/rust#59512
[59580]: rust-lang/rust#59580
[59283]: rust-lang/rust#59283
[59451]: rust-lang/rust#59451
[59076]: rust-lang/rust#59076
[58778]: rust-lang/rust#58778
[58717]: rust-lang/rust#58717
[58369]: rust-lang/rust#58369
[58423]: rust-lang/rust#58423
[58080]: rust-lang/rust#58080
[57847]: rust-lang/rust#57847
[58575]: rust-lang/rust#58575
[cargo/6298]: rust-lang/cargo#6298
[`f32::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.copysign
[`f64::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.copysign
[`RefCell::replace_with`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.replace_with
[`RefCell::map_split`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.map_split
[`ptr::hash`]: https://doc.rust-lang.org/stable/std/ptr/fn.hash.html
[`Range::contains`]: https://doc.rust-lang.org/std/ops/struct.Range.html#method.contains
[`RangeFrom::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeFrom.html#method.contains
[`RangeTo::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeTo.html#method.contains
[`RangeInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.contains
[`RangeToInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html#method.contains
[`Option::copied`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.copied
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.