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 14 pull requests #59141

Closed
wants to merge 51 commits into from
Closed

Conversation

pietroalbini
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

alexcrichton and others added 30 commits March 1, 2019 11:26
Originally added in rust-lang#55935 to test build times, this was reverted
in rust-lang#56201 due to a belief that it caused the exit code 259 spurious
errors. We've since learned, however, that the 259 exit code is likely
not related to this image update as we're getting it in a number of
locations now.

VS2017 looks like it may be required to compile LLVm in the near future,
notably discovered by rust-lang#58408 where we attempted to update LLVM.
same fix as commit fb98ca7
PR: rust-lang#58803

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.
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
…hton

Add tests for several E-needstest issues

This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise.

Closes rust-lang#10876.
Closes rust-lang#26448.
Closes rust-lang#26577.
Closes rust-lang#26619.
Closes rust-lang#27054.
Closes rust-lang#44127.
Closes rust-lang#44255.
Closes rust-lang#55731.
Closes rust-lang#57781.
… r=sanxiyn

Update compiler_builtins to 0.1.7 to get windows/arm fix
fs::copy() unix: 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
…-Simulacrum

appveyor: Use VS2017 for all our images

Originally added in rust-lang#55935 to test build times, this was reverted
in rust-lang#56201 due to a belief that it caused the exit code 259 spurious
errors. We've since learned, however, that the 259 exit code is likely
not related to this image update as we're getting it in a number of
locations now.

VS2017 looks like it may be required to compile LLVm in the near future,
notably discovered by rust-lang#58408 where we attempted to update LLVM.
…henkov

Parse lifetimes that start with a number and give specific error

Fix rust-lang#58786.
Fix documentation of from_ne_bytes and from_le_bytes

Copypasta mistake, the documentation of `from_ne_bytes` and `from_le_bytes` used the big-endian variant in the example snippets.
…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.
add suggestions to invalid macro item error

r? @estebank
…frewsxcv

Fix incorrect links in librustc_codegen_llvm documentation
…=oli-obk

Reduces Code Repetitions like `!n >> amt`

Fixes rust-lang#49937 .
This PR contains defining a function which operates bit inversion and reducing bit operation like `!0u128 >> (128 - size.bits())`.
…ater, r=Centril

impl FromIterator for Result: Use assert_eq! instead of assert!
Replace assert with assert_eq

Use `assert_eq!` instead of `assert!` for the tests
@pietroalbini-cat
Copy link

@bors try

@bors
Copy link
Contributor

bors commented Mar 12, 2019

@pietroalbini-cat: 🔑 Insufficient privileges: not in try users

@pietroalbini-cat
Copy link

@bors r+

@bors
Copy link
Contributor

bors commented Mar 12, 2019

@pietroalbini-cat: 🔑 Insufficient privileges: Not in reviewers

@pietroalbini
Copy link
Member Author

Aww, a cat!

@bors r+ p=14

@bors
Copy link
Contributor

bors commented Mar 12, 2019

📌 Commit 781f8be has been approved by pietroalbini

@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 12, 2019
@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:0192a176:start=1552418008739480772,finish=1552418082839979646,duration=74100498874
$ 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:13:37] .................................................................................................... 3700/5463
[01:13:40] .......................................................................ii........................... 3800/5463
[01:13:43] .........................................................................................i.......... 3900/5463
[01:13:45] .................................................................................................... 4000/5463
[01:13:47] ............................................F..i.................................................... 4100/5463
[01:14:00] .................................................................................................... 4300/5463
[01:14:05] .................................................................................................... 4400/5463
[01:14:08] .................................................................................................... 4500/5463
[01:14:12] .................................................................................................... 4600/5463
---
[01:14:44] ---- [ui] ui/parser/macros-no-semicolon-items.rs stdout ----
[01:14:44] diff of stderr:
[01:14:44] 
[01:14:44] 5    |                 ^^
[01:14:44] 6 help: change the delimiters to curly braces
[01:14:44] 7    |
[01:14:44] - LL | macro_rules! foo {}  //~ ERROR semicolon
[01:14:44] + LL | macro_rules! foo {}
[01:14:44] 10 help: add a semicolon
[01:14:44] 11    |
[01:14:44] 
[01:14:44] 
[01:14:44] - LL | macro_rules! foo();  //~ ERROR semicolon
[01:14:44] + LL | macro_rules! foo();
[01:14:44] 14 
[01:14:44] 14 
[01:14:44] 15 error: macros that expand to items must be delimited with braces or followed by a semicolon
[01:14:44] 16   --> $DIR/macros-no-semicolon-items.rs:8:5
[01:14:44] 17    |
[01:14:44] 17    |
[01:14:44] - LL |   bar!( //~ ERROR semicolon
[01:14:44] + LL |   bar!(
[01:14:44] 20 LL | |     blah
[01:14:44] 21 LL | |     blah
[01:14:44] 
[01:14:44] 24    | |_^
[01:14:44] 24    | |_^
[01:14:44] 25 help: change the delimiters to curly braces
[01:14:44] 26    |
[01:14:44] - LL | bar! { //~ ERROR semicolon
[01:14:44] + LL | bar! {
[01:14:44] 28 LL |     blah
[01:14:44] 29 LL |     blah
[01:14:44] 30 LL |     blah
[01:14:44] 38 error: unexpected end of macro invocation
[01:14:44] 39   --> $DIR/macros-no-semicolon-items.rs:1:1
[01:14:44] 40    |
[01:14:44] 40    |
[01:14:44] - LL | macro_rules! foo()  //~ ERROR semicolon
[01:14:44] + LL | macro_rules! foo()
[01:14:44] 42    | ^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
[01:14:44] 44 error: aborting due to 3 previous errors
[01:14:44] 
[01:14:44] 
[01:14:44] The actual stderr differed from the expected stderr.
[01:14:44] The actual stderr differed from the expected stderr.
[01:14:44] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/macros-no-semicolon-items/macros-no-semicolon-items.stderr
[01:14:44] To update references, rerun the tests and pass the `--bless` flag
[01:14:44] To only update this specific test, also pass `--test-args parser/macros-no-semicolon-items.rs`
[01:14:44] error: 1 errors occurred comparing output.
[01:14:44] status: exit code: 1
[01:14:44] status: exit code: 1
[01:14:44] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/parser/macros-no-semicolon-items.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/macros-no-semicolon-items/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/macros-no-semicolon-items/auxiliary" "-A" "unused"
[01:14:44] ------------------------------------------
[01:14:44] 
[01:14:44] ------------------------------------------
[01:14:44] stderr:
[01:14:44] stderr:
[01:14:44] ------------------------------------------
[01:14:44] {"message":"macros that expand to items must be delimited with braces or followed by a semicolon","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/parser/macros-no-semicolon-items.rs","byte_start":16,"byte_end":18,"line_start":1,"line_end":1,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":"macro_rules! foo()  //~ ERROR semicolon","highlight_start":17,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"change the delimiters to curly braces","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/parser/macros-no-semicolon-items.rs","byte_start":16,"byte_end":17,"line_start":1,"line_end":1,"column_start":17,"column_end":18,"is_primary":true,"text":[{"text":"macro_rules! foo()  //~ ERROR semicolon","highlight_start":17,"highlight_end":18}],"label":null,"suggested_replacement":" {","suggestion_applicability":"MaybeIncorrect","expansion":null},{"file_name":"/checkout/src/test/ui/parser/macros-no-semicolon-items.rs","byte_start":17,"byte_end":18,"line_start":1,"line_end":1,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":"macro_rules! foo()  //~ ERROR semicolon","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":"}","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null},{"message":"add a semicolon","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/parser/macros-no-semicolon-items.rs","byte_start":18,"byte_end":18,"line_start":1,"line_end":1,"column_start":19,"column_end":19,"is_primary":true,"text":[{"text":"macro_rules! foo()  //~ ERROR semicolon","highlight_start":19,"highlight_end":19}],"label":null,"suggested_replacement":";","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error: macros that expand to items must be delimited with braces or followed by a semicolon\n  --> /checkout/src/test/ui/parser/macros-no-semicolon-items.rs:1:17\n   |\nLL | macro_rules! foo()  //~ ERROR semicolon\n   |                 ^^\nhelp: change the delimiters to curly braces\n   |\nLL | macro_rules! foo {}  //~ ERROR semicolon\n   |                  ^^\nhelp: add a semicolon\n   |\nLL | macro_rules! foo();  //~ ERROR semicolon\n   |                   ^\n\n"}
[01:14:44] {"message":"macros that expand to items must be delimited with braces or followed by a semicolon","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/parser/macros-no-semicolon-items.rs","byte_start":149,"byte_end":199,"line_start":8,"line_end":12,"column_start":5,"column_end":2,"is_primary":true,"text":[{"text":"bar!( //~ ERROR semicolon","highlight_start":5,"highlight_end":26},{"text":"    blah","highlight_start":1,"highllowed by a semicolon\n  --> /checkout/src/test/ui/parser/macros-no-semicolon-items.rs:8:5\n   |\nLL |   bar!( //~ ERROR semicolon\n   |  _____^\nLL | |     blah\nLL | |     blah\nLL | |     blah\nLL | | )\n   | |_^\nhelp: change the delimiters to curly braces\n   |\nLL | bar! { //~ ERROR semicolon\nLL |     blah\nLL |     blah\nLL |     blah\nLL | }\n   |\nhelp: add a semicolon\n   |\nLL | );\n   |  ^\n\n"}
[01:14:44] {"message":"unexpected end of macro invocation","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/parser/macros-no-semicolon-items.rs","byte_start":0,"byte_end":18,"line_start":1,"line_end":1,"column_start":1,"column_end":19,"is_primary":true,"text":[{"text":"macro_rules! foo()  //~ ERROR semicolon","highlight_start":1,"highlight_end":19}],"label":"missing tokens in macro arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unexpected end of macro invocation\n  --> /checkout/src/test/ui/parser/macros-no-semicolon-items.rs:1:1\n   |\nLL | macro_rules! foo()  //~ ERROR semicolon\n   | ^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments\n\n"}
[01:14:44] 
[01:14:44] ------------------------------------------
[01:14:44] 
[01:14:44] thread '[ui] ui/parser/macros-no-semicolon-items.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3325:9
---
[01:14:44] 
[01:14:44] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:496:22
[01:14:44] 
[01:14:44] 
[01:14:44] 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/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--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/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:14:44] 
[01:14:44] 
[01:14:44] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:14:44] Build completed unsuccessfully in 0:04:23
[01:14:44] Build completed unsuccessfully in 0:04:23
[01:14:44] make: *** [check] Error 1
[01:14:44] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:09d7ae11
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Mar 12 20:29:37 UTC 2019

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)

@pietroalbini
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2019
@pietroalbini
Copy link
Member Author

Caused by #59079.

@pietroalbini pietroalbini deleted the rollup branch March 12, 2019 20:40
@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-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.