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 21 pull requests #53798

Closed
wants to merge 49 commits into from
Closed

Conversation

pietroalbini
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

kpp and others added 30 commits August 6, 2018 17:33
It's a ~1% win on `keccak` and `inflate`.
In case that it is statically known that the OS doesn't support
`getrandom` (non-Linux) or becomes clear at runtime that `getrandom`
isn't available (`ENOSYS`), the opened fd ("/dev/urandom") isn't closed
after the function, so that future calls can reuse it. This saves
repeated `open`/`close` system calls at the cost of one permanently open
fd.

Additionally, this skips the initial zero-length `getrandom` call and
directly hands the user buffer to the operating system, saving one
`getrandom` syscall.
This typo was introduced in rust-lang#47334.
A couple tests bitrotted as a result, so we fix those too, and move them
to a more sensible place.
`bad_style` is being deprecated in favor of `nonstandard_style`:

- rust-lang#41646
This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.

As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.

Closes rust-lang#53077
…q-example, r=QuietMisdreavus

Add another PartialEq example

r? @steveklabnik
…omez

Add example for Cow

Add one more example that shows how to keep `Cow` in a struct.

Link to playground: https://play.rust-lang.org/?gist=a9256bdd034b44bc3cdd0044bbcdbb7c&version=stable&mode=debug&edition=2015

Users ask this question in [ruRust](https://gitter.im/ruRust/general) chat time to time and it is not obvious to add `ToOwned<Owned=Target>` to requirements of generic params.
document effect of join on memory ordering

Fixes rust-lang#45467
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.

Most of the compiler uses the `Fx` hasher but some places ended up with the default one.
…artial-eq, r=KodrAus

Add partialeq implementation for TryFromIntError type

Fixes rust-lang#53458.
… r=varkor

Force-inline `shallow_resolve` at its hottest call site.

It's a ~1% win on `keccak` and `inflate`.
set applicability

Update a few more calls as described in rust-lang#50723

r? @estebank
Generalize `async_idents` to all new keywords

This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.

As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.

Closes rust-lang#53077
…o_vis_matcher, r=cramertj

Fix stabilisation version for macro_vis_matcher.

r? @cramertj
…richton

Reduce number of syscalls in `rand`

This skips the initial zero-length `getrandom` call and
directly hands the user buffer to the operating system, saving one
`getrandom` syscall.
…, r=nikomatsakis

Do not suggest dereferencing in macro

Fix rust-lang#52783.
save-analysis: Differentiate foreign functions and statics.
add llvm-readobj to llvm-tools-preview

Similar to readelf but supports more object formats (it seems). Particularly useful to inspect in detail sections (e.g. their flags) and symbols (e.g. their types).

r? @alexcrichton
cc @dvc94ch
fix a typo: taget_env -> target_env

This typo was introduced in rust-lang#47334. A couple tests bitrotted as a result, so we fix those too, and move them to a more sensible place.

Is there some lint we could turn on that would've caught this? It's a drag that cfg typos can silently pass through the compiler.
…etMisdreavus

Rustdoc fixes

Fixes rustdoc not scrolling to given lines and invalid unstable display:

<img width="1440" alt="screen shot 2018-08-27 at 23 28 47" src="https://user-images.githubusercontent.com/3050060/44687252-06535e80-aa51-11e8-8512-d7d34d1cb963.png">

r? @QuietMisdreavus
move file-extension based .gitignore down to src/

Currently, it for example ignores `*.rlib` files in the repository root -- which I think is wrong; I sometimes get these files when I call rustc directly and I do want them cleaned up, not ignored. No such files are created during the normal build process.
Fix a comment in src/libcore/slice/mod.rs
…shearth

Replace usages of 'bad_style' with 'nonstandard_style'.

`bad_style` is being deprecated in favor of `nonstandard_style`:

- rust-lang#41646
@pietroalbini
Copy link
Member Author

@bors r+ p=21

@bors
Copy link
Contributor

bors commented Aug 29, 2018

📌 Commit 31a6f9f 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 Aug 29, 2018
@bors
Copy link
Contributor

bors commented Aug 29, 2018

⌛ Testing commit 31a6f9f with merge 0ceb55e2bd9355363e066a62310b7d931516062e...

@bors
Copy link
Contributor

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

The job dist-x86_64-netbsd 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:25:39]    |         ^^^^
[00:25:39]    |
[00:25:39]    = note: `-D unused-imports` implied by `-D warnings`
[00:25:39] 
[00:25:39] error: unused import: `sys::os::errno`
[00:25:39]   --> libstd/sys/unix/rand.rs:33:9
[00:25:39]    |
[00:25:39] 33 |     use sys::os::errno;
[00:25:39] 
[00:25:43] error: aborting due to 2 previous errors
[00:25:43] 
[00:25:43] [RUSTC-TIMING] std test:false 5.471
[00:25:43] [RUSTC-TIMING] std test:false 5.471
[00:25:43] The following warnings were emitted during compilation:
[00:25:43] warning: ../libbacktrace/backtrace.c: In function 'unwind':
[00:25:43] warning: ../libbacktrace/backtrace.c:76:6: warning: assignment makes integer from pointer without a cast [enabled by default]
[00:25:43] warning:    pc = _Unwind_GetIP (context);
[00:25:43] warning:       ^
[00:25:43] warning:       ^
[00:25:43] 
[00:25:43] error: Could not compile `std`.
[00:25:43] 
[00:25:43] Caused by:
[00:25:43]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name std libstd/lib.rs --color always --error-format json --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg 'feature="alloc_jemalloc"' --cfg 'feature="backtrace"' --cfg 'feature="jemalloc"' --cfg 'feature="panic-unwind"' --cfg 'feature="panic_unwind"' -C metadata=ae62a46d23b93ea6 -C extra-filename=-ae62a46d23b93ea6 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps --target x86_64-unknown-netbsd -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/liballoc-eea75734c4ba7fe5.rlib --extern alloc_jemalloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/liballoc_jemalloc-926cbdc3245889a5.rlib --extern alloc_system=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/liballoc_system-5cde7ebd9d10e78c.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/libcompiler_builtins-efc64484d54820ea.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/libcore-22f899c6622a55d2.rlib --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/liblibc-913699c741fedca4.rlib --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/libpanic_abort-35ec611cae2b287c.rlib --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/libpanic_unwind-00db20d78b1a1300.rlib --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/deps/libunwind-e3332da9bccb8b0b.rlib -L native=/checkout/obj/build/x86_64-unknown-netbsd/native/libbacktrace/ -L native=/checkout/obj/build/x86_64-unknown-netbsd/native/libbacktrace -l static=backtrace -l static=backtrace -l pthread -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-netbsd/release/build/compiler_builtins-32fd61cdd3e8e009/out -L native=/checkout/obj/build/x86_64-unknown-netbsd/native/jemalloc/lib` (exit code: 1)
[00:25:43] expected success, got: exit code: 101
[00:25:43] expected success, got: exit code: 101
[00:25:43] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1155:9
[00:25:43] travis_fold:end:stage1-std

[00:25:43] travis_time:end:stage1-std:start=1535573220834843097,finish=1535573276687647328,duration=55852804231

---
travis_time:end:004e2faf:start=1535573277612006597,finish=1535573277618966304,duration=6959707
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:00189987
$ 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 -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:03dc68a8
travis_time:start:03dc68a8
$ 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:03c2ffb2
$ 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 August 29, 2018 20:13
@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.

None yet