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

Closed
wants to merge 46 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Apr 12, 2019

Successful merges:

Failed merges:

r? @ghost

matthewjasper and others added 30 commits April 4, 2019 21:25
This increases the size of some important types, such as `ast::Expr` and
`mir::Statement`. However, it drastically reduces how much the interner
is used, and the fields are more natural sizes that don't require bit
operations to extract.

As a result, instruction counts drop across a range of workloads, by as
much as 12% for incremental "check" builds of `script-servo`.

Peak memory usage goes up a little for some cases, but down by more for
some other cases -- as much as 18% for non-incremental builds of
`packed-simd`.

The commit also:
- removes the `repr(packed)`, because it has negligible effect, but can
  cause undefined behaviour;
- replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.)
  with derived ones.
It is now exactly equivalent to lookup_char_pos.
Implicit promotion on the other hand has very strict rules on what may be done
- Make links relative.
- Adjust links from old 2018-edition book.
- Fix broken link in `let` docs.
This commit implements the `{read,write}_vectored` methods on more types
in the standard library, namely:

* `std::fs::File`
* `std::process::ChildStd{in,out,err}`
* `std::io::Std{in,out,err}`
* `std::io::Std{in,out,err}Lock`
* `std::io::Std{in,out,err}Raw`

Where supported the OS implementations hook up to native support,
otherwise it falls back to the already-defaulted implementation.
It's useful to see the biggest variants first.
…enkov

Increase `Span` from 4 bytes to 8 bytes.

This increases the size of some important types, such as `ast::Expr` and
`mir::Statement`. However, it drastically reduces how much the interner
is used, and the fields are more natural sizes that don't require bit
operations to extract.

As a result, instruction counts drop across a range of workloads, by as
much as 10% for `script-servo` incremental builds.

Peak memory usage goes up a little for some cases, but down by more for
some other cases -- as much as 18% for non-incremental builds of
`packed-simd`.

The commit also:
- removes the `repr(packed)`, because it has negligible effect, but can
  cause undefined behaviour;
- replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.)
  with derived ones.

r? @petrochenkov
…-mut, r=pnkfelix

Mark variables captured by reference as mutable correctly

Closes rust-lang#59620

r? @pnkfelix
remove lookup_char_pos_adj

It is now exactly equivalent to lookup_char_pos.
…k, r=ehuss

Copy book.toml unstable book generator

Solves rust-lang#59554 and adds a book title to the unstable book.

I assume that [copy_recursive](https://github.com/rust-lang/rust/blob/acd8dd6a50d505057a7d7ad8d0d7a4c2bd274200/src/tools/unstable-book-gen/src/main.rs#L105) will take files regardless of their type (`.md` or `.toml`).

Although I had a hard time time testing it. A second pair of eyes is definitely needed.
Limit dylib symbols

This makes `windows-gnu` match the behavior of `windows-msvc`. It probably doesn't make sense to export these symbols on other platforms either.
Retire `IsNotConst` naming

This naming scheme caused a lot of confusion lately (including ICEs) due to misrefactored code. Also clean up the initialization code for said flag.

r? @eddyb

previous discussions: rust-lang#58784 (comment) rust-lang#58403 (comment)
…cramertj

Eliminate `FnBox` usages from libstd.
Fix links on keyword docs.

- Make links relative.
- Adjust links from old 2018-edition book.
- Fix broken link in `let` docs.
…acrum

Re-export NonZero signed variant in std

Closes  rust-lang#59834 .
std: Add `{read,write}_vectored` for more types

This commit implements the `{read,write}_vectored` methods on more types
in the standard library, namely:

* `std::fs::File`
* `std::process::ChildStd{in,out,err}`
* `std::io::Std{in,out,err}`
* `std::io::Std{in,out,err}Lock`
* `std::io::Std{in,out,err}Raw`

Where supported the OS implementations hook up to native support,
otherwise it falls back to the already-defaulted implementation.
…-type-decl, r=QuietMisdreavus

Fix attributes position in type declaration

Fixes rust-lang#59797.

r? @rust-lang/rustdoc
…Centril

Make duplicate matcher bindings a hard error

r? @Centril

Closes rust-lang#57742
Use SecRandomCopyBytes instead of /dev/urandom on MacOS

SecRandomCopyBytes is [available since MacOS 10.7](https://developer.apple.com/documentation/security/1399291-secrandomcopybytes?language=objc) which is the minimum supported version and which was suggested in rust-lang#58901 (comment) is the earliest version currently in use.

This matches the behaviour of other platforms which have a random number generator syscall available.
…ize, r=pnkfelix

In `-Zprint-type-size` output, sort enum variants by size.

It's useful to see the biggest variants first.

r? @pnkfelix
MaybeUninit: remove deprecated functions
@Centril
Copy link
Contributor Author

Centril commented Apr 12, 2019

@bors r+ p=17

@bors
Copy link
Contributor

bors commented Apr 12, 2019

📌 Commit 910c719 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 Apr 12, 2019
@bors
Copy link
Contributor

bors commented Apr 12, 2019

⌛ Testing commit 910c719 with merge 8a1354a2359211a04d831f3d4b79c8a0f962d45f...

@bors
Copy link
Contributor

bors commented Apr 12, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job dist-various-2 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:59:22]    Compiling panic_unwind v0.0.0 (/checkout/src/libpanic_unwind)
[00:59:23] [RUSTC-TIMING] panic_unwind test:false 0.240
[00:59:42] error: linking with `sparcv9-sun-solaris2.10-gcc` failed: exit code: 1
[00:59:42]   |
[00:59:42]   = note: "sparcv9-sun-solaris2.10-gcc" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/sparcv9-sun-solaris/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps/std-d78d1728fe345ee5.std.ajv6mi5u-cgu.0.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps/libstd-d78d1728fe345ee5.so" "-Wl,-M,/tmp/rustcyyN6QC/list" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps/std-d78d1728fe345ee5.1idtlln1s2yand06.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps/std-d78d1728fe345ee5.4z2gy4dz46fr542x.rcgu.o" "-Wl,-zignore" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/build/compiler_builtins-f1b47d285171b807/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/build/backtrace-sys-437db0d3ccefcba2/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/sparcv9-sun-solaris/lib" "-lsocket" "-lposix4" "-lpthread" "-lresolv" "-Wl,-Bstatic" "-Wl,--whole-archive" "/tmp/rustcyyN6QC/libpanic_unwind-5fcf5f96e35ebf7b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcyyN6QC/libbacktrace_sys-c2dccf1657ebd17f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcyyN6QC/librustc_demangle-441c25bcbcf7d921.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcyyN6QC/libunwind-4dd905694bb0512c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcyyN6QC/liblibc-c52303f164d8be4a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcyyN6QC/liballoc-ac0aed9b01c11413.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcyyN6QC/librustc_std_workspace_core-20f0b28d2561573f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcyyN6QC/libcore-dcc0e87728e57bb3.rlib" "-Wl,--no-whole-archive" "/tmp/rustcyyN6QC/libcompiler_builtins-c5375e1750e708b8.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-shared" "-Wl,-rpath,$ORIGIN/../lib"
[00:59:42]   = note: /usr/local/lib/gcc/sparcv9-sun-solaris2.10/6.4.0/../../../../sparcv9-sun-solaris2.10/bin/ld: warning: -z ignore ignored.
[00:59:42]           /usr/local/lib/gcc/sparcv9-sun-solaris2.10/6.4.0/../../../../sparcv9-sun-solaris2.10/bin/ld:/tmp/rustcyyN6QC/list: file format not recognized; treating as linker script
[00:59:42]           /usr/local/lib/gcc/sparcv9-sun-solaris2.10/6.4.0/../../../../sparcv9-sun-solaris2.10/bin/ld:/tmp/rustcyyN6QC/list:1: syntax error
[00:59:42]           
[00:59:42] 
[00:59:42] error: aborting due to previous error
[00:59:42] 
---
travis_time:end:2c2c7384:start=1555103261739527076,finish=1555103261744905868,duration=5378792
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:034e2d66
$ 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:0740dea0
travis_time:start:0740dea0
$ 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:01d29bf0
$ 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 Apr 12, 2019
@Centril Centril closed this Apr 13, 2019
@Centril Centril deleted the rollup-amorbbw branch April 13, 2019 13:54
@Centril Centril mentioned this pull request Apr 13, 2019
@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.