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

Closed
wants to merge 39 commits into from
Closed

Rollup of 17 pull requests #59075

wants to merge 39 commits into from

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 10, 2019

Successful merges:

Failed merges:

r? @ghost

haraldh and others added 30 commits March 1, 2019 09:05
A convenience method like fs::copy() should try to prevent pitfalls a
normal user doesn't think about.

In case of an empty umask, setting the file mode early prevents
temporarily world readable or even writeable files,
because the default mode is 0o666.

In case the target is a named pipe or special device node, setting the
file mode can lead to unwanted side effects, like setting permissons on
`/dev/stdout` or for root setting permissions on `/dev/null`.

copy_file_range() returns EINVAL, if the destination is a FIFO/pipe or
a device like "/dev/null", so fallback to io::copy, too.

Fixes: rust-lang#26933
Fixed: rust-lang#37885
Ensure the core::ffi::VaList structure passes the improper_ctypes lint.
There's lots of comments in the code, but the main gist of this commit
is that the acquisition of the global malloc lock on the
`wasm32-unknown-unknown` target when threads are enabled will not spin
on contention rather than block.
MIPS r6 is quite different with the previous version.
It use some new target triples:
  mipsisa32r6-unknown-linux-gnu
  mipsisa32r6el-unknown-linux-gnu
  mipsisa64r6-unknown-linux-gnuabi64
  mipsisa64r6el-unknown-linux-gnuabi64

This patch has been tested with Debian Port for mips64r6el,
and the support of these triples also is included in llvm:
  https://reviews.llvm.org/rGe58c45a695f39004710b6ce940d489fee800dbd3
A `Def::Variant` should be considered as a function in mir pretty
printing. Each variant has a constructor that we must print.

Given the following enum definition:

```
pub enum TestMe {
    X(usize),
}
```

We will need to generate a constructor for the variant `X` with a
signature that looks something like the following:

```
fn TestMe::X(_1: usize) -> TestMe;
```
…nkfelix

Make migrate mode work at item level granularity

Migrate mode now works entirely at the item level rather than the body level,
ensuring that we don't lose any errors in contained closures.

Closes rust-lang#58776

r? @pnkfelix
… r=sanxiyn

Update compiler_builtins to 0.1.7 to get windows/arm fix
fs::copy() linux: set file mode early

A convenience method like fs::copy() should try to prevent pitfalls a
normal user doesn't think about.

In case of an empty umask, setting the file mode early prevents
temporarily world readable or even writeable files,
because the default mode is 0o666.

In case the target is a named pipe or special device node, setting the
file mode can lead to unwanted side effects, like setting permissons on
`/dev/stdout` or for root setting permissions on `/dev/null`.

copy_file_range() returns EINVAL, if the destination is a FIFO/pipe or
a device like "/dev/null", so fallback to io::copy, too.

Fixes: rust-lang#26933
Fixed: rust-lang#37885
librustc_interface: Update scoped-tls to 1.0

Done previously as a part of rust-lang#58748.

r? @Zoxc
…Mark-Simulacrum

Prevent cache issues on version updates

Fixes rust-lang#58827.

cc @rust-lang/infra
…oc, r=fitzgen

std: Spin for a global malloc lock on wasm32

There's lots of comments in the code, but the main gist of this commit
is that the acquisition of the global malloc lock on the
`wasm32-unknown-unknown` target when threads are enabled will not spin
on contention rather than block.
…rochenkov

Adds help message in error for invalid `impl for T` syntax

Fixes rust-lang#56031.
…henkov

Parse lifetimes that start with a number and give specific error

Fix rust-lang#58786.
Change `std::fs::copy` to use `copyfile` on MacOS and iOS

`copyfile` on MacOS is similar to `CopyFileEx` on Windows. It supports copying resource forks, extended attributes, and file ACLs, none of which are copied by the current generic unix implementation.

The API is available from MacOS 10.7 and iOS 4.3 (and possibly earlier but I haven't checked).

Closes rust-lang#58895.
core: ensure VaList passes improper_ctypes lint

Ensure the `core::ffi::VaList` structure passes the `improper_ctypes` lint.

Fixes: rust-lang#58280
MIPS: add r6 support

MIPS r6 is quite different with the previous version.
It use some new target triples:
  mipsisa32r6-unknown-linux-gnu
  mipsisa32r6el-unknown-linux-gnu
  mipsisa64r6-unknown-linux-gnuabi64
  mipsisa64r6el-unknown-linux-gnuabi64

This patch has been tested with Debian Port for mips64r6el,
and the support of these triples also is included in llvm:
  https://reviews.llvm.org/rGe58c45a695f39004710b6ce940d489fee800dbd3
…twco

When encountetring `||{}()`, suggest the likely intended `(||{})()`

Fix rust-lang#55851.
Fix ICE in MIR pretty printing

A `Def::Variant` should be considered as a function in mir pretty
printing. Each variant has a constructor that we must print.

Given the following enum definition:

```rust
pub enum TestMe {
    X(usize),
}
```

We will need to generate a constructor for the variant `X` with a
signature that looks something like the following:

```
fn TestMe::X(_1: usize) -> TestMe;
```

Fixes: rust-lang#59021
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
…ackler

Use lifetime contravariance to elide more lifetimes in core+alloc+std

Sample:
```diff
-    impl<'a, 'b, A: ?Sized, B: ?Sized> PartialEq<&'b mut B> for &'a mut A where A: PartialEq<B> {
+    impl<A: ?Sized, B: ?Sized> PartialEq<&mut B> for &mut A where A: PartialEq<B> {
         #[inline]
-        fn eq(&self, other: &&'b mut B) -> bool { PartialEq::eq(*self, *other) }
+        fn eq(&self, other: &&mut B) -> bool { PartialEq::eq(*self, *other) }
         #[inline]
-        fn ne(&self, other: &&'b mut B) -> bool { PartialEq::ne(*self, *other) }
+        fn ne(&self, other: &&mut B) -> bool { PartialEq::ne(*self, *other) }
     }
```

[I didn't know this worked](https://internals.rust-lang.org/t/why-can-you-use-different-unconstrained-lifetimes-to-implement-traits/9544/2?u=scottmcm) until recently, but since defining methods contravariantly in their lifetimes this way has worked back to Rust 1.0, we might as well take advantage of combining it with IHLE.
we can now skip should_panic tests with the libtest harness
@Centril
Copy link
Contributor Author

Centril commented Mar 10, 2019

@bors r+ p=17

@bors
Copy link
Contributor

bors commented Mar 10, 2019

📌 Commit 5358bb1 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 Mar 10, 2019
@bors
Copy link
Contributor

bors commented Mar 10, 2019

⌛ Testing commit 5358bb1 with merge a90a39a96da91a50256af0e9a097bda904cd9f38...

@bors
Copy link
Contributor

bors commented Mar 11, 2019

💔 Test failed - checks-travis

@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 Mar 11, 2019
@rust-highfive
Copy link
Collaborator

The job arm-android 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.
[01:43:53] ---- [run-pass] run-pass/paths-containing-nul.rs stdout ----
[01:43:53] 
[01:43:53] error: test run failed!
[01:43:53] status: exit code: 101
[01:43:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "run" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/paths-containing-nul/a"
[01:43:53] ------------------------------------------
[01:43:53] ------------------------------------------
[01:43:53] uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/paths-containing-nul/a", waiting for result
[01:43:53] ------------------------------------------
[01:43:53] stderr:
[01:43:53] ------------------------------------------
[01:43:53] ------------------------------------------
[01:43:53] thread 'main' panicked at 'copy2 returned a strange NotFound on a path with NUL', /checkout/src/test/run-pass/paths-containing-nul.rs:12:23
[01:43:53] 
[01:43:53] ------------------------------------------
[01:43:53] 
[01:43:53] thread '[run-pass] run-pass/paths-containing-nul.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
---
[01:43:53] 
[01:43:53] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:496:22
[01:43:53] 
[01:43:53] 
[01:43:53] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-arm-linux-androideabi" "--mode" "run-pass" "--target" "arm-linux-androideabi" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "/android/ndk/arm-14/bin/arm-linux-androideabi-clang" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/arm-linux-androideabi/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--llvm-version" "8.0.0\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--remote-test-client" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "/android/ndk/arm-14" "--color" "always"
[01:43:53] 
[01:43:53] 
[01:43:53] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target arm-linux-androideabi
[01:43:53] Build completed unsuccessfully in 1:33:37
---
travis_time:end:0e1493b0:start=1552267665831307952,finish=1552267665841331913,duration=10023961
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1519b238
$ 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:26ced7cc
travis_time:start:26ced7cc
$ 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:0c2e1ee8
$ 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 closed this Mar 11, 2019
@Centril Centril deleted the rollup branch March 11, 2019 01:57
@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-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.