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 16 pull requests #56376

Closed
wants to merge 38 commits into from
Closed

Rollup of 16 pull requests #56376

wants to merge 38 commits into from

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Nov 30, 2018

Successful merges:

Failed merges:

r? @ghost

nnethercote and others added 30 commits November 20, 2018 20:55
This requires adding a new method, `P::filter_map`.

This commit reduces instruction counts for various benchmarks by up to
0.7%.
`TryFrom<&[T]> for &[T; $N]` (note *reference* to an array) already exists,
but not needing to dereference makes type inference easier
for example when using `u32::from_be_bytes`.

Also add doc examples doing just that.
This way all files needed by packagers now reside in toplevel

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit converts some 2-space indents to 4-space indents.
They are unused. The commit also adds some blank lines between some
methods.
`Printer::word` takes a `&str` and converts it into a `String`, which
causes an allocation. But that allocation is rarely necessary, because
`&str` is almost always a `&'static str` or a `String` that won't be
used again.

This commit changes `Token::String` so it holds a `Cow<'static, str>`
instead of a `String`, which avoids a lot of allocations.
`pretty_print` takes a `Token` and `match`es on it. But the particular
`Token` kind is known at each call site, so this commit splits it into
five functions: `pretty_print_eof`, `pretty_print_begin`, etc.

This commit also does likewise with `print`, though there is one
callsite for `print` where the `Token` kind isn't known, so a generic
`print` has to stay (but it now just calls out to the various `print_*`
functions).
`mir_stats` has not been used since 2b32cb9.
This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.
I noticed on a [recent build][1] that the linkchecker stage of CI took a
whopping 15 minutes of CI time for something that should be near
instantaneous. Some local profiling showed some very hot functions and
clones which were pretty easy to remove, and now instead of running in
minutes locally it runs in seconds.

[1]: https://ci.appveyor.com/project/rust-lang/rust/build/job/kptifw1kb1nm4xuu
Don't panic in determining the privacy of a type if a lifetime outlives
generic exists in an existential type.
…oerister

Use sort_by_cached_key when the key function is not trivial/free

I'm not 100% sure about `def_path_hash` (everything it does is inlined) but it seems like a good idea at least for the rest, as they are cloning.
add test for issue rust-lang#21335

Running this test with LLVM assertions enabled doesn't seem to trigger an assertion on my Mac.

Fixes rust-lang#21335.
Assorted tweaks

- preallocate `VecDeque` in `Decodable::decode` (as it is done with other collections which can do it)
- add a FIXME to `String::from_utf16`

r? @RalfJung
…ithoutboats

Add TryFrom<&[T]> for [T; $N] where T: Copy

`TryFrom<&[T]> for &[T; $N]` (note *reference* to an array) already exists, but not needing to dereference makes type inference easier for example when using `u32::from_be_bytes`.

Also add doc examples doing just that.
Update cargo

14 commits in b3d0b2e545b61d4cd08096911724b7d49d213f73..1ff5975b96b3d395bb962394596998dfb485f793
2018-11-15 19:13:04 +0000 to 2018-11-25 14:59:12 +0000
- Intern SourceId (rust-lang/cargo#6342)
- Tweak Layout to allow for non json file targets with internal "." (rust-lang/cargo#6255)
- Correct Target Directory command-line option (rust-lang/cargo#6343)
- Persistent data structures by im-rs (rust-lang/cargo#6336)
- Move command prelude into main library (rust-lang/cargo#6335)
- Distinguish custom build invocations (rust-lang/cargo#6331)
- Allow crate_type=bin examples to run (rust-lang/cargo#6330)
- Make verify-project honour unstable features (rust-lang/cargo#6326)
- Make autodiscovery disable inferred targets (rust-lang/cargo#6329)
- Add `c` alias for `check` (rust-lang/cargo#6218)
- Allow user aliases to override built-in aliases (rust-lang/cargo#6259)
- Fix renaming directory project using build scripts with cross-compiling. (rust-lang/cargo#6328)
- Fix add_plugin_deps-related tests. (rust-lang/cargo#6327)
- Add a glossary. (rust-lang/cargo#6321)
…r=petrochenkov

Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`.

This requires adding a new method, `P::filter_map`.

This commit reduces instruction counts for various benchmarks by up to
0.7%.
move stage0.txt to toplevel directory

This way all files needed by packagers now reside in toplevel
update miri

This should make miri green again :)
(Includes rust-lang/miri#553)

r? @oli-obk
…akis

Clean up and streamline the pretty-printer

Some minor improvements.
…excrichton

Remove not used option

`mir_stats` has not been used since 2b32cb9.
…-Simulacrum

Rename conversion util; remove duplicate util in librustc_codegen_llvm.
…ension, r=nagisa

rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker

Part of rust-lang#55396.

This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.

r? @nagisa
cc @alexcrichton @japaric
Add inline attributes and add unit to CommonTypes
…troalbini

Optimize local linkchecker program

I noticed on a [recent build][1] that the linkchecker stage of CI took a
whopping 15 minutes of CI time for something that should be near
instantaneous. Some local profiling showed some very hot functions and
clones which were pretty easy to remove, and now instead of running in
minutes locally it runs in seconds.

[1]: https://ci.appveyor.com/project/rust-lang/rust/build/job/kptifw1kb1nm4xuu
Fix panic with outlives in existential type

Don't panic in determining the privacy of a type if a lifetime outlives
generic exists in an existential type.

r? @oli-obk

Fixes: rust-lang#55903
…imulacrum

Update books

This pulls in @gankro 's final nomicon changes, and adds the edition guide as a submodule.

This is the final doc backport to beta for 1.31, as well.
@kennytm
Copy link
Member Author

kennytm commented Nov 30, 2018

@bors r+ p=16

@bors
Copy link
Contributor

bors commented Nov 30, 2018

📌 Commit 69eea7a has been approved by kennytm

@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 Nov 30, 2018
@bors
Copy link
Contributor

bors commented Nov 30, 2018

⌛ Testing commit 69eea7a with merge 75b0d8523e78684fd123748f27f4eadb1bd9a09c...

@bors
Copy link
Contributor

bors commented Nov 30, 2018

💔 Test failed - status-travis

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-distcheck 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:00:00] rm 'src/tools/lldb'
[00:00:00] Attempting with retry: sh -c rm -f download-src-tools-lldb.tar.gz &&         curl -sSL -o download-src-tools-lldb.tar.gz https://github.com/rust-lang-nursery/lldb/archive/8ad0817ce45b0eef9d374691b23f2bd69c164254.tar.gz
[00:00:00] rm 'src/tools/clang'
[00:00:00] Attempting with retry: sh -c rm -f download-src-tools-clang.tar.gz &&         curl -sSL -o download-src-tools-clang.tar.gz https://github.com/rust-lang-nursery/clang/archive/032312dd0140a7074c9b89d305fe44eb0e44e407.tar.gz
[00:00:00] Attempting with retry: sh -c git submodule deinit -f  src/tools/rust-installer src/liblibc src/doc/nomicon src/tools/cargo src/doc/reference src/tools/rls src/libcompiler_builtins src/tools/clippy src/tools/rustfmt src/tools/miri src/dlmalloc src/stdsimd src/libbacktrace src/doc/rustc-guide src/doc/edition-guide &&     git submodule sync &&     git submodule update -j 16 --init --recursive  src/tools/rust-installer src/liblibc src/doc/nomicon src/tools/cargo src/doc/reference src/tools/rls src/libcompiler_builtins src/tools/clippy src/tools/rustfmt src/tools/miri src/dlmalloc src/stdsimd src/libbacktrace src/doc/rustc-guide src/doc/edition-guide
[00:00:00] Cleared directory 'src/doc/edition-guide'
[00:00:00] Cleared directory 'src/doc/nomicon'
[00:00:00] Cleared directory 'src/doc/reference'
[00:00:00] Cleared directory 'src/doc/rustc-guide'
---
[00:00:00] Cleared directory 'src/tools/rls'
[00:00:00] Cleared directory 'src/tools/rust-installer'
[00:00:00] Cleared directory 'src/tools/rustfmt'
[00:00:00] Submodule 'src/dlmalloc' (https://github.com/alexcrichton/dlmalloc-rs.git) registered for path 'src/dlmalloc'
[00:00:00] Submodule 'src/doc/edition-guide' (https://github.com/rust-lang-nursery/edition-guide) registered for path 'src/doc/edition-guide'
[00:00:00] Submodule 'src/doc/reference' (https://github.com/rust-lang-nursery/reference.git) registered for path 'src/doc/reference'
[00:00:00] Submodule 'src/doc/rustc-guide' (https://github.com/rust-lang/rustc-guide.git) registered for path 'src/doc/rustc-guide'
[00:00:00] Submodule 'src/libbacktrace' (https://github.com/rust-lang-nursery/libbacktrace.git) registered for path 'src/libbacktrace'
[00:00:00] Submodule 'src/libcompiler_builtins' (https://github.com/rust-lang-nursery/compiler-builtins.git) registered for path 'src/libcompiler_builtins'
---
[00:04:41]    Vendoring humantime v1.1.1 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/humantime-1.1.1) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/humantime
[00:04:41]    Vendoring idna v0.1.5 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/idna-0.1.5) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/idna
[00:04:41]    Vendoring if_chain v0.1.3 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/if_chain-0.1.3) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/if_chain
[00:04:41]    Vendoring ignore v0.4.3 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ignore-0.4.3) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/ignore
[00:04:41]    Vendoring im-rc v12.2.0 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/im-rc-12.2.0) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/im-rc
[00:04:41]    Vendoring itertools v0.7.8 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/itertools-0.7.8) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/itertools
[00:04:41]    Vendoring itoa v0.4.3 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/itoa-0.4.3) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/itoa
[00:04:41]    Vendoring jemalloc-sys v0.1.8 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/jemalloc-sys-0.1.8) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/jemalloc-sys
[00:04:41]    Vendoring jobserver v0.1.11 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/jobserver-0.1.11) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/jobserver
---
[00:04:42]    Vendoring thread_local v0.3.6 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/thread_local-0.3.6) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/thread_local
[00:04:42]    Vendoring time v0.1.40 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/time-0.1.40) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/time
[00:04:42]    Vendoring toml v0.4.6 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/toml-0.4.6) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/toml
[00:04:42]    Vendoring toml-query v0.6.0 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/toml-query-0.6.0) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/toml-query
[00:04:42]    Vendoring typenum v1.10.0 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/typenum-1.10.0) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/typenum
[00:04:42]    Vendoring unicode-bidi v0.3.4 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/unicode-bidi-0.3.4) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/unicode-bidi
[00:04:42]    Vendoring unicode-normalization v0.1.7 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/unicode-normalization-0.1.7) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/unicode-normalization
[00:04:42]    Vendoring unicode-segmentation v1.2.1 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/unicode-segmentation-1.2.1) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/unicode-segmentation
[00:04:42]    Vendoring unicode-width v0.1.5 (/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/unicode-width-0.1.5) to /checkout/obj/build/tmp/dist/rustc-1.32.0-dev-src/vendor/unicode-width
---
[00:12:10] configure: 
[00:12:10] configure: run `python /checkout/obj/build/tmp/distcheck/x.py --help`
[00:12:10] configure: 
[00:12:10] Traceback (most recent call last):
[00:12:10]   File "/checkout/obj/build/tmp/distcheck/src/bootstrap/bootstrap.py", line 870, in <module>
[00:12:10]     main()
[00:12:10]   File "/checkout/obj/build/tmp/distcheck/src/bootstrap/bootstrap.py", line 853, in main
[00:12:10]     bootstrap(help_triggered)
[00:12:10]   File "/checkout/obj/build/tmp/distcheck/src/bootstrap/bootstrap.py", line 810, in bootstrap
[00:12:10]     data = stage0_data(build.rust_root)
[00:12:10]   File "/checkout/obj/build/tmp/distcheck/src/bootstrap/bootstrap.py", line 158, in stage0_data
[00:12:10]     with open(nightlies, 'r') as nightlies:
[00:12:10] IOError: [Errno 2] No such file or directory: '/checkout/obj/build/tmp/distcheck/stage0.txt'
[00:12:10] make: *** [check] Error 1
[00:12:10] Makefile:58: recipe for target 'check' failed
[00:12:10] 
[00:12:10] 
[00:12:10] command did not execute successfully: "make" "check"
[00:12:10] 
[00:12:10] 
[00:12:10] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test distcheck
[00:12:10] Build completed unsuccessfully in 0:10:01
---
travis_time:end:27df1b88:start=1543593620086998346,finish=1543593620096555355,duration=9557009
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:102188d6
$ 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:28c8b93d
travis_time:start:28c8b93d
$ 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:22b7119c
$ 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)

@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 Nov 30, 2018
@kennytm kennytm closed this Nov 30, 2018
@kennytm kennytm deleted the rollup branch November 30, 2018 17:02
@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.