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

Closed
wants to merge 44 commits into from
Closed

Conversation

pietroalbini
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

yui-knk and others added 30 commits November 29, 2018 08:54
`mir_stats` mod has not been used since c1ff104.
Popping and pushing from the end of a linked list is constant time. This
documentation is already there for popping and pushing from the front.

@bors: r+ 38fe8d2 rollup
Also, provide a suggestion for the correct syntax.
Includes some new stabilized intrinsics for the wasm32 target!

Closes rust-lang#56292
Initially, rust-lang#50233 accidentally changed the capacity of empty ZST. This
was pointed out during code review. This commit adds a test to prevent
capacity of ZST vectors from accidentally changing to prevent that
from happening again.
Add lint for items deprecated in future

Resolves rust-lang#55892
…omatsakis

Remove not used mod

`mir_stats` mod has not been used since c1ff104.
Clearer error message for dead assign

I'm not that this is the right place for this (if it needs an RFC or not).

I had the problem where I misunderstood the compiler lint message rust-lang#56436 and other people seem to have had the same problem https://www.reddit.com/r/rust/comments/8cy9p4/value_assigned_to_is_never_read/.

I think this new wording might be slightly clearer (and help out beginners like me). I'm very new though, so there might be some nuance I'm missing that would make this more confusing or a bad idea for other reasons.

I thought I would create a PR to make it easy to change the code if the consensus was that it would make sense to make a change.

If this is the wrong place for this sort of thing I'll happily delete/move it.
…MatthewJasper

polonius tweaks

- bump polonius to 0.6.0
- fix 2-phase-borrow activations

r? @matthewjasper
Contexually dependent error message for E0424 when value is assigned to "self"

This is an improvement for pull request rust-lang#54495 referencing issue rust-lang#54369. If the "self" keyword is assigned a value as though it were a valid identifier, it will now report:
```
let self = "self";
    ^^^^ `self` value is a keyword and may not be bound to variables or shadowed
```
instead of
```
let self = "self";
    ^^^^ `self` value is a keyword only available in methods with `self` parameter
```
If anyone has a better idea for what the error should be I'd be happy to modify it appropriately.
Document time of back operations of a Linked List

Popping and pushing from the end of a linked list is constant time. This
documentation is already there for popping and pushing from the front.

@bors: r+ 38fe8d2 rollup
#[must_use] on traits in stdlib

Based on rust-lang#55506.

Adds `#[must_use]` attribute to traits in the stdlib:
- `Iterator`
- `Future`
- `FnOnce`
- `Fn`
- `FnMut`

There may be other traits that should have the attribute, but I couldn't find/think of any.
overhaul external doc attribute diagnostics

This PR improves the error handling and spans for the external doc attribute. Many cases that silently failed before now emit errors, spans are tightened, and the errors have help and suggestions.

I tried to address all the cases that users ran into in the tracking issue.

cc rust-lang#44732

r? @QuietMisdreavus
…matsakis

Update the stdsimd submodule

Includes some new stabilized intrinsics for the wasm32 target!

Closes rust-lang#56292
…k, r=jonas-schievink

fix install broken link

solves rust-lang#56690
…alexcrichton

Always set the RDRAND and RDSEED features on SGX

Not sure if this is 100% correct.

This [Intel article](https://software.intel.com/en-us/articles/intel-software-guard-extensions-tutorial-part-5-enclave-development) goes in great depth regarding using (untrusted) CPUID to see whether RDRAND/RDSEED is supported, and explains what happens to the enclave if the CPUID result is faked.

I'd say that an implementation of SGX that doesn't make RDRAND available to the enclave is so severely limited/broken that it's ok if you get #UD in that case. The case is less clear for RDSEED, but it so far every processor released by Intel with SGX support also has RDSEED (including Gemini Lake).

cc @briansmith
Test capacity of ZST vector

Initially, rust-lang#50233 accidentally changed the capacity of empty ZST. This was pointed out during code review. This commit adds a test to prevent capacity of ZST vectors from accidentally changing to prevent that from happening again.
… r=alexcrichton

Use libbacktrace pretty-printing

r? @alexcrichton
fix rust-lang/rust issue rust-lang#50583

Rationale for the fix is in rust-lang#50583.  I've verified that before the fix /musl-armhf/lib/libc.a is riddled with the illegal variant of vmov.f64 and after the fix the version built doesn't contain any of these illegal instructions.

I originally thought that the arm-linux-gnueabi version also needed fixing - to add a -mfloat-abi-soft but that's unnecessary as it's compiled with the gnueabi (not hf) compiler (I've some a quick check that the libc.a produced doesn't include VFP instructions).

r? @alexcrichton
…s-message, r=zackmdavis

Fix private_no_mangle_fns message grammar

Simply changes "an warning" to "a warning" in the `private_no_mangle_fns` warning. I started getting this in some code after upgrading to 1.31.0.
…osure-using-region-from-containing-fn, r=nikomatsakis

Add test of current behavior (infer free region within closure body)

This behavior was previously not encoded in our test suite.

it is pretty important that we test this behavior. In particular, in rust-lang#56537  I had proposed expanding the lifetime elision rules so that they would apply to some of the cases encoded in this test, which would cause them to start failing to compile successfully (because the lifetime attached to the return type would start being treated as connected to the lifetime on the input parameter to the lambda expression, which is explicitly *not* what the code wants in this particular case).

In other words, I am trying to ensure that anyone who tries such experiments with lifetime elision in the future quickly finds out why we don't support lifetime elision on lambda expressions (at least not in the naive manner described on rust-lang#56537).
@pietroalbini
Copy link
Member Author

@bors r+ p=17

@bors
Copy link
Contributor

bors commented Dec 12, 2018

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

bors commented Dec 12, 2018

⌛ Testing commit d6814a3 with merge e639be24ad65bddc3cf544fbbf80f0d3e036ce3b...

@bors
Copy link
Contributor

bors commented Dec 13, 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 13, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-tools 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:13:02] +For more information about this error, try `rustc --explain E0658`.
[01:13:02] +
[01:13:02] 
[01:13:02] The actual stderr differed from the expected stderr.
[01:13:02] Actual stderr saved to /tmp/compiletestxCqJFh/regions-mock-trans.stderr
[01:13:02] To update references, run this command from build directory:
[01:13:02] tests/run-pass/update-references.sh '/tmp/compiletestxCqJFh' 'regions-mock-trans.rs'
[01:13:02] error: 1 errors occurred comparing output.
[01:13:02] status: exit code: 1
[01:13:02] status: exit code: 1
[01:13:02] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/miri" "tests/run-pass/regions-mock-trans.rs" "-L" "/tmp/compiletestxCqJFh" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/tmp/compiletestxCqJFh/regions-mock-trans.stage-id" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "-Dwarnings" "-Dunused" "--edition" "2018" "-L" "/tmp/compiletestxCqJFh/regions-mock-trans.stage-id.aux" "-A" "unused"
[01:13:02] ------------------------------------------
[01:13:02] 
[01:13:02] ------------------------------------------
[01:13:02] stderr:
---
[01:13:02] +For more information about this error, try `rustc --explain E0658`.
[01:13:02] +
[01:13:02] 
[01:13:02] The actual stderr differed from the expected stderr.
[01:13:02] Actual stderr saved to /tmp/compiletestxCqJFh/thread-local.stderr
[01:13:02] To update references, run this command from build directory:
[01:13:02] tests/run-pass/update-references.sh '/tmp/compiletestxCqJFh' 'thread-local.rs'
[01:13:02] error: 1 errors occurred comparing output.
[01:13:02] status: exit code: 1
[01:13:02] status: exit code: 1
[01:13:02] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/miri" "tests/run-pass/thread-local.rs" "-L" "/tmp/compiletestxCqJFh" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/tmp/compiletestxCqJFh/thread-local.stage-id" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "-Dwarnings" "-Dunused" "--edition" "2018" "-L" "/tmp/compiletestxCqJFh/thread-local.stage-id.aux" "-A" "unused"
[01:13:02] ------------------------------------------
[01:13:02] 
[01:13:02] ------------------------------------------
[01:13:02] stderr:
---
[01:13:02] Verifying status of rustfmt...
[01:13:02] Verifying status of clippy-driver...
[01:13:02] This PR updated 'src/tools/clippy', verifying if status is 'test-pass'...
[01:13:02] 
[01:13:02] ⚠️ We detected that this PR updated 'clippy-driver', but its tests failed.
[01:13:02] 
[01:13:02] If you do intend to update 'clippy-driver', please check the error messages above and
[01:13:02] commit another update.
[01:13:02] 
[01:13:02] If you do NOT intend to update 'clippy-driver', please ensure you did not accidentally
[01:13:02] change the submodule at 'src/tools/clippy'. You may ask your reviewer for the
[01:13:02] proper steps.
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 3.
travis_time:start:140fb5d1
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Dec 13 01:11:25 UTC 2018
---
travis_time:end:05de8f8d:start=1544663486857619001,finish=1544663486864984707,duration=7365706
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2b5d4fbe
$ 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:01249ab0
travis_time:start:01249ab0
$ 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:06c0aedf
$ 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)

@pietroalbini pietroalbini deleted the rollup branch December 13, 2018 11:59
@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.