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

Closed
wants to merge 52 commits into from
Closed

Rollup of 16 pull requests #58559

wants to merge 52 commits into from

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Feb 18, 2019

Successful merges:

ollie27 and others added 30 commits January 17, 2019 09:22
Now that we have {to|from}_be_bytes the code can be simpler.

(Inspired by PR rust-lang#57740)
Since the generic-ness is only for the as_refs, might as well have std just compile the important part once instead of on every use.
I felt the description of forbid was misleading/incomplete without
mentioning how --cap-lints interacts with it.
The rustc "-g" CLI flag was miss documented to be a synonym of "-C
debug-level=2" and not the correct "-C debuginfo=2".
The rustc "-g" and "-o" fags are synonyms of the "-c" codegen flags.
This adds a link to the codegen docs for each synonym.
…Zoxc

HirId-ify intravisit

A big step towards rust-lang#57578.

This affects mostly `hir::{collector, intravisit}` and `rustc::lint`.
…=oli-obk

Use less explicit shifting in std::net::ip

Now that we have `{to|from}_be_bytes` the code can be simpler.

(Inspired by PR rust-lang#57740)
Don't use an allocation for ItemId in StmtKind
Monomorphize less code in fs::{read|write}

Since the generic-ness is only for the as_refs, might as well have std just compile the important part once instead of on every use.
…ts, r=oli-obk

Mention capping forbid lints

I felt the description of forbid was misleading/incomplete without
mentioning how --cap-lints interacts with it.
…RalfJung

Remove UB in pointer tests

UB found by Miri.
…albini

Bump the bootstrap compiler

This compiler includes rust-lang#58501, which fixes an annoying ICE while working on rustc itself.

r? @pietroalbini
…TimNN

Fix doc for rustc "-g" flag

The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym.

I am unsure of this will conflict with work on rust-lang#52938
…Centril

Add regression test for a specialization-related ICE (rust-lang#39448)

Closes rust-lang#39448.

This is my first time contributing, I hope I got everything right. :)
… r=Centril

librustc_codegen_llvm => 2018

Transitions `librustc_codegen_llvm` to Rust 2018; cc rust-lang#58099

r? @Centril
Explain a panic in test case net::tcp::tests::double_bind

Those who try to build libstd on the Windows Subsystem for Linux experience a single failing test, where the point of failure is an explicit but anonymous panic, as reported in rust-lang#49367
This commit somewhat explains why and allows diagnosing a little.
Add a note about 2018e if someone uses `try {` in 2015e

Inspired by rust-lang#58491, where a `try_blocks` example was accidentally run in 2015, which of course produces a bunch of errors.

What's the philosophy about gating for this?  The keyword is stably a keyword in 2018, so I haven't gated it for now but am not mentioning what the keyword _does_.  Let me know if I should do differently.
@kennytm
Copy link
Member Author

kennytm commented Feb 18, 2019

@bors r+ p=150 treeclosed=160

Will reopen the tree after 58549 is merged.

@bors
Copy link
Contributor

bors commented Feb 18, 2019

📌 Commit df0912e has been approved by kennytm

@bors
Copy link
Contributor

bors commented Feb 18, 2019

🌲 The tree is currently closed for pull requests below priority 160, this pull request will be tested once the tree is reopened

@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 Feb 18, 2019
libstd => 2018

Transitions `libstd` to Rust 2018; cc rust-lang#58099
@kennytm kennytm changed the title Rollup of 15 pull requests Rollup of 16 pull requests Feb 18, 2019
@kennytm
Copy link
Member Author

kennytm commented Feb 18, 2019

@bors r+

Added #58208.

@bors
Copy link
Contributor

bors commented Feb 18, 2019

📌 Commit 6688c77 has been approved by kennytm

@bors
Copy link
Contributor

bors commented Feb 18, 2019

🌲 The tree is currently closed for pull requests below priority 160, this pull request will be tested once the tree is reopened

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:191ebc50:start=1550494922604814971,finish=1550495030179799176,duration=107574984205
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:03:21]   Downloaded digest v0.7.6
[00:03:21]   Downloaded bytes v0.4.11
[00:03:21]   Downloaded fuchsia-zircon-sys v0.3.3
[00:03:21]   Downloaded mdbook v0.2.3
[00:03:21]   Downloaded blake2-rfc v0.2.18
[00:03:21]   Downloaded compiler_builtins v0.1.5
[00:03:21]   Downloaded cloudabi v0.0.3
[00:03:21]   Downloaded unreachable v1.0.0
[00:03:21]   Downloaded xattr v0.2.2
---
[00:03:27]   Downloaded if_chain v0.1.3
[00:03:27]   Downloaded signal-hook v0.1.7
[00:03:27]   Downloaded ucd-trie v0.1.1
[00:03:27]   Downloaded parking_lot v0.6.4
[00:03:27]   Downloaded constant_time_eq v0.1.3
[00:03:27]   Downloaded chalk-macros v0.1.0
[00:03:27]   Downloaded clap v2.32.0
[00:03:27]   Downloaded racer v2.1.19
[00:03:27]   Downloaded miow v0.3.3
---
[00:03:28]   Downloaded hex v0.3.2
[00:03:28]   Downloaded winapi-util v0.1.1
[00:03:28]   Downloaded mio-uds v0.6.7
[00:03:28]   Downloaded termcolor v1.0.4
[00:03:28]   Downloaded argon2rs v0.2.5
[00:03:29]   Downloaded pest_derive v2.1.0
[00:03:29]   Downloaded rand_core v0.2.2
[00:03:29]   Downloaded xz2 v0.1.5
[00:03:29]   Downloaded ansi_term v0.11.0
---
[00:04:57] 
[00:04:57] error[E0433]: failed to resolve: use of undeclared type or module `AtomicU64`
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/cache.rs:87:15
[00:04:57]    |
[00:04:57] 87 |         Cache(AtomicU64::new(u64::max_value()))
[00:04:57] 
[00:04:57] error[E0433]: failed to resolve: use of undeclared type or module `Ordering`
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/cache.rs:92:21
[00:04:57]    |
[00:04:57]    |
[00:04:57] 92 |         self.0.load(Ordering::Relaxed) == u64::max_value()
[00:04:57] 
[00:04:57] error[E0433]: failed to resolve: use of undeclared type or module `Ordering`
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/cache.rs:98:31
[00:04:57]    |
[00:04:57]    |
[00:04:57] 98 |         test_bit(CACHE.0.load(Ordering::Relaxed), bit)
[00:04:57] 
[00:04:57] error[E0433]: failed to resolve: use of undeclared type or module `Ordering`
[00:04:57]    --> src/libstd/../stdsimd/crates/std_detect/src/detect/cache.rs:104:31
[00:04:57]     |
[00:04:57]     |
[00:04:57] 104 |         self.0.store(value.0, Ordering::Relaxed);
[00:04:57] 
[00:04:57] error[E0433]: failed to resolve: use of undeclared type or module `mem`
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:59:13
[00:04:57]    |
[00:04:57]    |
[00:04:57] 59 |             mem::transmute(ebx),
[00:04:57]    |             ^^^ use of undeclared type or module `mem`
[00:04:57] error[E0433]: failed to resolve: use of undeclared type or module `mem`
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:60:13
[00:04:57]    |
[00:04:57]    |
[00:04:57] 60 |             mem::transmute(edx),
[00:04:57]    |             ^^^ use of undeclared type or module `mem`
[00:04:57] error[E0433]: failed to resolve: use of undeclared type or module `mem`
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:61:13
[00:04:57]    |
[00:04:57]    |
[00:04:57] 61 |             mem::transmute(ecx),
[00:04:57]    |             ^^^ use of undeclared type or module `mem`
[00:04:57] error[E0433]: failed to resolve: use of undeclared type or module `mem`
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:63:35
[00:04:57]    |
[00:04:57]    |
[00:04:57] 63 |         let vendor_id: [u8; 12] = mem::transmute(vendor_id);
[00:04:57]    |                                   ^^^ use of undeclared type or module `mem`
[00:04:57] error[E0412]: cannot find type `AtomicU64` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/cache.rs:76:14
[00:04:57]    |
[00:04:57]    |
[00:04:57] 76 | struct Cache(AtomicU64);
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57] 6  | use core::sync::atomic::AtomicU64;
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::sync::atomic::AtomicU64;
[00:04:57]    |
[00:04:57] 
[00:04:57] error[E0425]: cannot find function `has_cpuid` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:39:9
[00:04:57]    |
[00:04:57] 39 |     if !has_cpuid() {
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::has_cpuid;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::has_cpuid;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0425]: cannot find function `__cpuid` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:57:13
[00:04:57]    |
[00:04:57] 57 |         } = __cpuid(0);
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::__cpuid;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::__cpuid;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0422]: cannot find struct, variant or union type `CpuidResult` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:52:13
[00:04:57]    |
[00:04:57] 52 |         let CpuidResult {
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::CpuidResult;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::CpuidResult;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0425]: cannot find function `__cpuid` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:78:18
[00:04:57]    |
[00:04:57] 78 |     } = unsafe { __cpuid(0x0000_0001_u32) };
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::__cpuid;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::__cpuid;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0422]: cannot find struct, variant or union type `CpuidResult` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:74:9
[00:04:57]    |
[00:04:57] 74 |     let CpuidResult {
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::CpuidResult;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::CpuidResult;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0425]: cannot find function `__cpuid` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:84:53
[00:04:57]    |
[00:04:57] 84 |         let CpuidResult { ebx, ecx, .. } = unsafe { __cpuid(0x0000_0007_u32) };
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::__cpuid;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::__cpuid;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0422]: cannot find struct, variant or union type `CpuidResult` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:84:13
[00:04:57]    |
[00:04:57] 84 |         let CpuidResult { ebx, ecx, .. } = unsafe { __cpuid(0x0000_0007_u32) };
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::CpuidResult;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::CpuidResult;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0425]: cannot find function `__cpuid` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:96:18
[00:04:57]    |
[00:04:57] 96 |     } = unsafe { __cpuid(0x8000_0000_u32) };
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::__cpuid;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::__cpuid;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0422]: cannot find struct, variant or union type `CpuidResult` in this scope
[00:04:57]   --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:93:9
[00:04:57]    |
[00:04:57] 93 |     let CpuidResult {
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]    |
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::CpuidResult;
[00:04:57]    |
[00:04:57] 6  | use core::arch::x86_64::CpuidResult;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0425]: cannot find function `__cpuid` in this scope
[00:04:57]    --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:101:48
[00:04:57]     |
[00:04:57] 101 |         let CpuidResult { ecx, .. } = unsafe { __cpuid(0x8000_0001_u32) };
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]     |
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::__cpuid;
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::__cpuid;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0422]: cannot find struct, variant or union type `CpuidResult` in this scope
[00:04:57]    --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:101:13
[00:04:57]     |
[00:04:57] 101 |         let CpuidResult { ecx, .. } = unsafe { __cpuid(0x8000_0001_u32) };
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]     |
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::CpuidResult;
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::CpuidResult;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0425]: cannot find function `_xgetbv` in this scope
[00:04:57]    --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:164:37
[00:04:57]     |
[00:04:57] 164 |                 let xcr0 = unsafe { _xgetbv(0) };
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]     |
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::_xgetbv;
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::_xgetbv;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0425]: cannot find function `__cpuid_count` in this scope
[00:04:57]    --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:192:38
[00:04:57]     |
[00:04:57] 192 |                         } = unsafe { __cpuid_count(0xd_u32, 1) };
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]     |
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::__cpuid_count;
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::__cpuid_count;
[00:04:57] 
[00:04:57] 
[00:04:57] error[E0422]: cannot find struct, variant or union type `CpuidResult` in this scope
[00:04:57]    --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:189:29
[00:04:57]     |
[00:04:57] 189 |                         let CpuidResult {
[00:04:57] help: possible candidates are found in other modules, you can import them into scope
[00:04:57]     |
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::CpuidResult;
[00:04:57]     |
[00:04:57] 6   | use core::arch::x86_64::CpuidResult;
[00:04:57] 
[00:04:57] error: unused import: `sync::atomic::Ordering`
[00:04:57]  --> src/libstd/../stdsimd/crates/std_detect/src/detect/cache.rs:6:5
[00:04:57]   |
---
[00:04:57]   |
[00:04:57] 9 | use sync::atomic::AtomicU64;
[00:04:57]   |     ^^^^^^^^^^^^^^^^^^^^^^^
[00:04:57] 
[00:04:57] error: unused import: `arch::x86_64::*`
[00:04:57]  --> src/libstd/../stdsimd/crates/std_detect/src/detect/os/x86.rs:6:5
[00:04:57] 6 | use arch::x86_64::*;
[00:04:57]   |     ^^^^^^^^^^^^^^^
[00:04:57] 
[00:04:57] error: unused import: `mem`
---
[00:05:00] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:05:00] expected success, got: exit code: 101
[00:05:00] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:05:00] Build completed unsuccessfully in 0:00:44
[00:05:00] Makefile:18: recipe for target 'all' failed
[00:05:00] make: *** [all] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:05b6bd12
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Feb 18 13:09:00 UTC 2019
---
199324 ./obj/build/cache/2019-02-17
156148 ./src/llvm-project/clang
155960 ./obj/build/bootstrap/debug/incremental
141180 ./obj/build/bootstrap/debug/incremental/bootstrap-3i6jt5nchoxcn
141176 ./obj/build/bootstrap/debug/incremental/bootstrap-3i6jt5nchoxcn/s-f9lrnxqm42-bhi434-1wm2zcqodn409
108528 ./src/llvm-project/lldb
97552 ./src/llvm-project/clang/test
89964 ./src/llvm-emscripten/test/CodeGen
79632 ./.git/modules
---
travis_time:end:0831b2ce:start=1550495340878672293,finish=1550495340883390341,duration=4718048
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0ab71fd3
$ 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:17173948
travis_time:start:17173948
$ 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:00d66f2e
$ 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 Author

kennytm commented Feb 18, 2019

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 18, 2019
@kennytm
Copy link
Member Author

kennytm commented Feb 18, 2019

Let's retry after libstd is upgraded to 2018 🤷

@kennytm kennytm closed this Feb 18, 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-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.