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

Merged
merged 43 commits into from
Nov 11, 2018
Merged

Rollup of 17 pull requests #55859

merged 43 commits into from
Nov 11, 2018

Conversation

pietroalbini
Copy link
Member

@pietroalbini pietroalbini commented Nov 10, 2018

Successful merges:

petrochenkov and others added 30 commits November 3, 2018 00:07
This has been replaced by the hard error E0719.
This avoids some allocations, reducing instruction counts by 1% on a
couple of benchmarks.
* Rounds allocation layout up to a multiple of alignment
* Adds a convenience method `Layout::pad_to_align` to perform rounding
(The commit prior to this actual passes our test suite, "thanks"
to rust-lang#55695. But since I am aware of that bug, I took advantage of it
in choosing how to order my commit series...)
This reduces the number of allocations in a "check clean" build of
`tuple-stress` by 14%, reducing instruction counts by 0.6%.
This commit fixes an ICE and determines the correct return span in cases
with a method implemented on a struct with an an elided lifetime.
When I fixed the previous mis-optimizations, I didn't realize there were
actually two different places where we mutate `callsites` and both of
them should have the same behavior.

As a result, if a function was inlined and that function contained
virtual function calls, they were incorrectly being inlined. I also
added a test case which covers this.
This avoids trapping in the -Zsaturating-float-casts implementation.
Take supertraits into account when calculating associated types

Fixes rust-lang#24010 and rust-lang#23856. Applies to trait aliases too.

As a by-product, this PR also makes repeated bindings of the same associated item in the same definition a hard error. This was previously a warning with a note about it becoming a hard error in the future. See rust-lang#50589 for more info.

I talked about this with @nikomatsakis recently, but only very superficially, so this shouldn't stop anyone from assigning it to themself to review and r+.

N.B. The "WIP" commits represent imperfect attempts to solve the problem just for trait objects, but I've left them in for reference for the sake of whomever is reviewing this.

CC @carllerche @theemathas @durka @mbrubeck
…llVec, r=matthewjasper

Convert `outlives_components`' return value to a `SmallVec` outparam.

This avoids some allocations, reducing instruction counts by 1% on a
couple of benchmarks.
Fix Rc/Arc allocation layout

* Rounds allocation layout up to a multiple of alignment
* Adds a convenience method `Layout::pad_to_align` to perform rounding

Closes rust-lang#55747

cc rust-lang#55724
@pietroalbini
Copy link
Member Author

@bors r+ p=14

@bors
Copy link
Contributor

bors commented Nov 10, 2018

📌 Commit 17ae507 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 Nov 10, 2018
@bors
Copy link
Contributor

bors commented Nov 11, 2018

⌛ Testing commit 17ae507 with merge 11787781b41f024eb8d64bf29c0ae3211802e639...

@bors
Copy link
Contributor

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

The job arm-android 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:44:38] test string::test_str_add ... ok
[01:44:38] test string::test_str_truncate ... ok
[01:44:38] test string::test_str_truncate_invalid_len ... ok
[01:44:38] test string::test_str_truncate_split_codepoint ... ok
[01:44:38] died due to signal 11
[01:44:38] error: test failed, to rerun pass '--test collectionstests'
[01:44:38] 
[01:44:38] 
[01:44:38] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "arm-linux-androideabi" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "-p" "alloc" "--"
[01:44:38] 
[01:44:38] 
[01:44:38] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target arm-linux-androideabi
[01:44:38] Build completed unsuccessfully in 1:32:50
---
travis_time:end:0ef81d9f:start=1541907801280568428,finish=1541907801297314731,duration=16746303
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1e89470c
$ 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:2037cdaa
travis_time:start:2037cdaa
$ 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:00f1e21d
$ 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)

@kennytm
Copy link
Member

kennytm commented Nov 11, 2018

@bors retry

arm-android "died due to signal 11"

@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 Nov 11, 2018
resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` on 2018 edition

This is a tiny thing.
For historical reasons macro prelude (macros from `#[macro_use] extern crate ...`, including `extern crate std`) is still available in modules with `#[no_implicit_prelude]`.
This PR provides proper isolation and removes those names from scope.

`#[no_implicit_prelude]` modules still have built-in types (`u8`), built-in attributes (`#[inline]`) and built-in macros (`env!("PATH")`) in scope. We can introduce some `#[no_implicit_prelude_at_all]` to remove those as well, but that's a separate issue.

The change is done only on 2018 edition for backward compatibility.
I'm pretty sure this can be done on 2015 as well because `#[no_implicit_prelude]` is rarely used, but I don't want to go through the crater/deprecation process right now, maybe later.

cc rust-lang#53977
r? @ghost
…crichton

Set BINARYEN_TRAP_MODE=clamp

This fixes the wasm32-unknown-emscripten test failure mentioned in rust-lang#55626 (comment), by making binaryen operate in clamp rather than trap mode.

The issue is that the current `-Zsaturating-float-casts` implementation uses `fpto[us]i` unconditionally (and selects afterwards), which does not work with trapping implementations of fpto[su]i, which emscripten uses by default.

I've left a FIXME to drop this flag once we have a better solution for saturating casts on the LLVM side.
;
…=GuillaumeGomez

rustdoc: refactor: move all static-file include!s into a single module

This is a smaller refactor that creates a new module `rustdoc::html::static_files`, which contains a bunch of `static` variables with all the files in `html/static` that we use. The idea behind moving them all here was to remove the duplicate `include_bytes!()` that are used by the theme-checker code. It also continues to centralize more operations in rustdoc.
@kennytm kennytm changed the title Rollup of 14 pull requests Rollup of 17 pull requests Nov 11, 2018
@kennytm
Copy link
Member

kennytm commented Nov 11, 2018

@bors r+

Added #55630, #55845, #55856.

@bors
Copy link
Contributor

bors commented Nov 11, 2018

📌 Commit 7031e4e has been approved by kennytm

@bors
Copy link
Contributor

bors commented Nov 11, 2018

⌛ Testing commit 7031e4e with merge b76ee83...

bors added a commit that referenced this pull request Nov 11, 2018
Rollup of 17 pull requests

Successful merges:

 - #55630 (resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` on 2018 edition)
 - #55687 (Take supertraits into account when calculating associated types)
 - #55745 (Convert `outlives_components`' return value to a `SmallVec` outparam.)
 - #55764 (Fix Rc/Arc allocation layout)
 - #55792 (Prevent ICE in const-prop array oob check)
 - #55799 (Removed unneeded instance of `// revisions` from a lint test)
 - #55800 (Fix ICE in `return_type_impl_trait`)
 - #55801 (NLL: Update box insensitivity test)
 - #55802 (Don't inline virtual calls (take 2))
 - #55816 (Use `SmallVec` to avoid allocations in `from_decimal_string`.)
 - #55819 (Typecheck patterns of all match arms first, so we get types for bindings)
 - #55822 (ICE with #![feature(nll)] and elided lifetimes)
 - #55828 (Add missing `rustc_promotable` attribute to unsigned `min_value` and `max_value`)
 - #55839 (Fix docstring spelling mistakes)
 - #55844 (Fix documentation typos.)
 - #55845 (Set BINARYEN_TRAP_MODE=clamp)
 - #55856 (rustdoc: refactor: move all static-file include!s into a single module)
@bors
Copy link
Contributor

bors commented Nov 11, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: kennytm
Pushing b76ee83 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.