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

Merged
merged 43 commits into from
Dec 24, 2018
Merged

Rollup of 14 pull requests #57087

merged 43 commits into from
Dec 24, 2018

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Dec 23, 2018

Successful merges:

Failed merges:

r? @ghost

sinkuu and others added 30 commits December 17, 2018 22:16
This is done by adding a new `IsJoint` field to `TokenStream::Tree`,
which simplifies a lot of `match` statements. And likewise for
`CursorKind`.

The commit also adds a new method `TokenTree:stream()` which can replace
a choice between `.into()` and `.joint()`.
We need to reduce the alignment with the used offset. If the offset
isn't known, we need to reduce with the element size to support
arbitrary offsets.
Remove pin::Unpin reexport and add Unpin to the prelude.
Change Pin associated functions to methods.
Rename get_mut_unchecked_ to get_unchecked_mut
Remove impl Unpin for Pin
Mark Pin repr(transparent)
Weirdly, we were deciding between a help note and a structured
suggestion based on whether the import candidate span was a dummy—but
we weren't using that span in any case! The dummy-ness of the span
(which appears to be a matter of this-crate vs. other-crate
definition) isn't the right criterion by which we should decide
whether it's germane to mention that "there is an enum variant";
instead, let's use the someness of `def` (which is used as the
`has_unexpected_resolution` argument to `error_code`).

Since `import_candidate_to_paths` has no other callers, we are free to
stop returning the span and rename the function. By using
`span_suggestions_`, we leverage the max-suggestions output limit
already built in to the emitter, thus resolving rust-lang#56028.

In the matter of message wording, "you can" is redundant (and perhaps
too informal); prefer the imperative.
The present author regrets not thinking of a more eloquent way to do
this.
Changes the original example to use more idiomatic formatting as well
as `.checked_add`. Also adds a second example to show a case where the
`.collect` returns `None`.
…dtwco

enum type instead of variant suggestion unification

Fixes rust-lang#56028.

Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of `def` (which is used as the `has_unexpected_resolution` argument to `error_code`).

Since `import_candidate_to_paths` has no other callers, we are free to stop returning the span and rename the function. By using `span_suggestions_`, we leverage the max-suggestions output limit already built in to the emitter, thus resolving rust-lang#56028.

In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative.

In a second commit, we do some unprincipled special-casing to correct and beautify suggestions for `Option` and `Result` (where the existing code was being confused by their being reexported in the prelude).

r? @davidtwco
…r=Centril

fix deprecation warnings in liballoc benches
Fix alignment for array indexing

We need to reduce the alignment with the used offset. If the offset isn't known, use the element size, as this will yield the minimum possible alignment.

This handles both direct array indexing, and array repeat expressions.

Fixes rust-lang#56927.

r? @nagisa
…fn, r=oli-obk

Stabilize min_const_unsafe_fn in 1.33

Fixes rust-lang#55607

r? @oli-obk
Ignore two tests on s390x

Ignore two tests on s390x which don't make sense on s390x as they are x86-specific.
@Centril
Copy link
Contributor Author

Centril commented Dec 23, 2018

@bors
Copy link
Contributor

bors commented Dec 23, 2018

📌 Commit dff3e41 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 Dec 23, 2018
@bors
Copy link
Contributor

bors commented Dec 24, 2018

⌛ Testing commit dff3e41 with merge 6cf3475158718318224ba67d55d949d82f2aacc7...

@bors
Copy link
Contributor

bors commented Dec 24, 2018

💔 Test failed - status-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 Dec 24, 2018
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-linux 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.
[00:04:52] + hide_output make install
[00:04:52] + set +x
[00:05:11] shared.sh: line 11:   351 Terminated              bash -c "while true; do sleep 30; echo \$(date) - building ...; done"
[00:05:11] + cd ..
[00:05:11] + rm -rf openssl-1.0.2k
[00:05:11] ./build-openssl.sh: line 25:  4114 Terminated              bash -c "while true; do sleep 30; echo \$(date) - building ...; done"  (wd: /tmp/openssl-1.0.2k)
[00:05:11] + ln -nsf /etc/pki/tls/cert.pem /rustroot/ssl/
[00:05:12] Removing intermediate container b26588aa1031
[00:05:12] Step 14/41 : COPY dist-x86_64-linux/build-curl.sh /tmp/
[00:05:12]  ---> c8fa79e89a9b
[00:05:12] Step 15/41 : RUN ./build-curl.sh
[00:05:12] Step 15/41 : RUN ./build-curl.sh
[00:05:12]  ---> Running in f7443690323f
[00:05:12] + source shared.sh
[00:05:12] + VERSION=7.51.0
[00:05:12] + curl http://cool.haxx.se/download/curl-7.51.0.tar.bz2
[00:05:13]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[00:05:13]                                  Dload  Upload   Total   Spent    Left  Speed
[00:05:15] 
  0 2509k    0 14215    0     0   9291      0  0:04:36  0:00:01  0:04:35  9291
  0 2509k    0 14215    0     0   9291      0  0:04:36  0:00:01  0:04:35  9291
  2 2509k    2 59559    0     0  33498      0  0:01:16  0:00:01  0:01:15  177k
 94 2509k   94 2366k    0     0   859k      0  0:00:02  0:00:02 --:--:-- 1921k
100 2509k  100 2509k    0     0   906k      0  0:00:02  0:00:02 --:--:-- 2016k
[00:05:15] + mkdir curl-build
[00:05:15] + cd curl-build
[00:05:15] + hide_output ../curl-7.51.0/configure --prefix=/rustroot --with-ssl=/rustroot --disable-sspi --disable-gopher --disable-smtp --disable-smb --disable-imap --disable-pop3 --disable-tftp --disable-telnet --disable-manual --disable-dict --disable-rtsp --disable-ldaps --disable-ldap
[00:05:36] + hide_output make -j10
[00:05:36] + set +x
[00:05:48] shared.sh: line 11:    12 Terminated              bash -c "while true; do sleep 30; echo \$(date) - building ...; done"
[00:05:48] + hide_output make install
---
 91 82.1M   91 75.0M    0     0  4034k      0  0:00:20  0:00:19  0:00:01 3754k
 96 82.1M   96 79.0M    0     0  4037k      0  0:00:20  0:00:20 --:--:-- 3687k
100 82.1M  100 82.1M    0     0  4048k      0  0:00:20  0:00:20 --:--:-- 3881k
[00:09:29] + cd gcc-4.8.5
[00:09:29] + sed -i 's|ftp://gcc\.gnu\.org/|http://gcc.gnu.org/|g' ./contrib/download_prerequisites
[00:09:29] --2018-12-24 00:51:40--  http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2
[00:09:29] Resolving gcc.gnu.org... 209.132.180.131
[00:09:29] Connecting to gcc.gnu.org|209.132.180.131|:80... connected.
[00:09:29] HTTP request sent, awaiting response... 200 OK
---
[00:43:11]  ---> 0640c711d7b1
[00:43:11] Step 25/41 : RUN ./build-clang.sh
[00:43:11]  ---> Running in fb8c52e36e21
[00:43:11] + source shared.sh
[00:43:11] + LLVM=032b00a5404865765cda7db3039f39d54964d8b0
[00:43:11] + LLD=3e4aa4e8671523321af51449e0569f455ef3ad43
[00:43:11] + CLANG=a6b9739069763243020f4ea6fe586bc135fde1f9
[00:43:11] + mkdir clang
[00:43:11] + cd clang
[00:43:11] + curl -L https://github.com/llvm-mirror/llvm/archive/032b00a5404865765cda7db3039f39d54964d8b0.tar.gz
[00:43:11] + tar xzf - --strip-components=1
[00:43:11]                                  Dload  Upload   Total   Spent    Left  Speed
[00:43:11] 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   158    0   158    0     0    687      0 --:--:-- --:--:-- --:--:--   718
---
[00:43:16] 
 33 17.1M   33 5934k    0     0  7104k      0  0:00:02 --:--:--  0:00:02 7104k
100 17.1M  100 17.1M    0     0  10.1M      0  0:00:01  0:00:01 --:--:-- 13.3M
[00:43:16] + mkdir -p tools/lld
[00:43:16] + curl -L https://github.com/llvm-mirror/lld/archive/3e4aa4e8671523321af51449e0569f455ef3ad43.tar.gz
[00:43:16] + tar zxf - --strip-components=1 -C tools/lld
[00:43:16]                                  Dload  Upload   Total   Spent    Left  Speed
[00:43:16] 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
---
[00:43:16] + cd clang-build
[00:43:16] + INC=/rustroot/include
[00:43:16] + INC=/rustroot/include:/rustroot/lib/gcc/x86_64-unknown-linux-gnu/4.8.5/include-fixed
[00:43:16] + INC=/rustroot/include:/rustroot/lib/gcc/x86_64-unknown-linux-gnu/4.8.5/include-fixed:/usr/include
[00:43:16] + hide_output cmake .. -DCMAKE_C_COMPILER=/rustroot/bin/gcc -DCMAKE_CXX_COMPILER=/rustroot/bin/g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/rustroot -DLLVM_TARGETS_TO_BUILD=X86 -DC_INCLUDE_DIRS=/rustroot/include:/rustroot/lib/gcc/x86_64-unknown-linux-gnu/4.8.5/include-fixed:/usr/include
[00:43:46] Mon Dec 24 01:25:57 UTC 2018 - building ...
[00:43:49] + hide_output make -j10
[00:43:49] + set +x
[00:44:19] Mon Dec 24 01:26:30 UTC 2018 - building ...
---
[01:45:31]  ---> 869b26fdbed3
[01:45:31] Step 32/41 : RUN ./build-perl.sh
[01:45:31]  ---> Running in b93984e71f11
[01:45:31] + source shared.sh
[01:45:31] + curl https://www.cpan.org/src/5.0/perl-5.28.0.tar.gz
[01:45:31]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[01:45:31]                                  Dload  Upload   Total   Spent    Left  Speed
[01:45:32] 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
---
[02:54:37] [RUSTC-TIMING] memmap test:false 0.663
[02:54:38] [RUSTC-TIMING] num_cpus test:false 1.292
[02:54:43] [RUSTC-TIMING] rustc_llvm test:false 2.511

Broadcast message from root@travis-job-4e3bb012-e590-4b65-8b05-0c7329b74a43
 (unknown) at 3:41 ...
The system is going down for power off NOW!

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

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 24, 2018
@bors
Copy link
Contributor

bors commented Dec 24, 2018

⌛ Testing commit dff3e41 with merge 94bf2c1...

bors added a commit that referenced this pull request Dec 24, 2018
Rollup of 14 pull requests

Successful merges:

 - #56188 (enum type instead of variant suggestion unification )
 - #56342 (Improve docs for collecting into `Option`s)
 - #56916 (Fix mutable references in `static mut`)
 - #56917 (Simplify MIR generation for logical operations)
 - #56939 (Pin stabilization)
 - #56953 (Mark tuple structs as live if their constructors are used)
 - #56964 (Remove `TokenStream::JointTree`.)
 - #56966 (Correct strings for raw pointer deref and array access suggestions)
 - #57020 (Point to cause of `fn` expected return type)
 - #57032 (fix deprecation warnings in liballoc benches)
 - #57053 (Fix alignment for array indexing)
 - #57062 (Fix a comment)
 - #57067 (Stabilize min_const_unsafe_fn in 1.33)
 - #57078 (Ignore two tests on s390x)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Dec 24, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: Centril
Pushing 94bf2c1 to master...

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.