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

Closed
wants to merge 57 commits into from
Closed

Conversation

cramertj
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

Zoxc and others added 30 commits March 31, 2019 03:11
We relax the assumption that the discriminant is always field 0, in
preparations for layouts like generators where this is not going to be
the case.
This adds some extra docs for the `no-prefer-dynamic` header.

And also a `s/must_compile_successfully/compile_pass`.

`must_compile_successfully` has been renamed to `compile_pass` at some
point in the past and this comment was still referring to the old name.
Christian and others added 19 commits April 10, 2019 12:10
…ble compiler flags, instead of flags for debugging.
Fix lifetime on LocalInternedString::get function

cc @eddyb @nnethercote
…petrochenkov

Properly parse '--extern-private' with name and path

It turns out that rust-lang#57586 didn't properly parse `--extern-private name=path`.

This PR properly implements the `--extern-private` option. I've added a new `extern-private` option to `compiletest`, which causes an `--extern-private` option to be passed to the compiler with the proper path.

Part of rust-lang#44663
Move back::link and debuginfo::type_names to cg ssa

r? @eddyb
…rch, r=QuietMisdreavus

Ensure that exact matches come first in rustdoc search

Fixes rust-lang#59287.

cc @scottmcm

r? @QuietMisdreavus
 Add discr_index to multi-variant layouts

We remove the assumption that the discriminant is always field 0, in
preparations for layouts like generators where this is not (always) going to be
the case.

Specifically, upvars are going to go before the discriminant. In theory, it's possible to remove _that_ assumption instead and keep the discriminant at field index 0, but one assumption or the other had to go :)

There is one place I know of in the debuginfo code where we'll still need to remove assumptions that the discriminant is the _only_ field. I was planning on doing this along with the upcoming generator change, which will also include tests that exercise the code changing in this PR.

r? @eddyb
cc @oli-obk
cc @cramertj
Use a proc macro to declare preallocated symbols

r? @petrochenkov
…mertj

Document the -Z flag to the rustc book

# Description

Changes:
- Added new documentation on the `-Z` flag of rustc in the command-line arguments section of the rustc book.

If I need to rephrase anything or if you have any improvements, please let me know! I deliberately did not create an exhaustive list of all options since they are likely to change over time and per toolchain version.

closes rust-lang#41142
…-mut, r=pnkfelix

Mark variables captured by reference as mutable correctly

Closes rust-lang#59620

r? @pnkfelix
Final (one can only hope) futures_api adjustments

Based on rust-lang#59119 -- this change is only the latter two commits.
cc rust-lang#59725

r? @withoutboats
compiletest: Improve no_prefer_dynamic docs

This adds some extra docs for the `no-prefer-dynamic` header.

And also a `s/must_compile_successfully/compile_pass`.

`must_compile_successfully` has been renamed to `compile_pass` at some
point in the past and this comment was still referring to the old name.
Kill dead code dominator code.

Hi,

Whilst fiddling around in the dominator code, I found some (I think) unused code. This code *was* used at the time it was imported, but over time it seems to have become redundant.

I've tested a build up to stage 1 with no problems. Maybe the tests will turn up something though.

P.S.

There is a FIXME comment in `dominators/mod.rs`:
```
    pub fn is_dominated_by(&self, node: Node, dom: Node) -> bool {
        // FIXME -- could be optimized by using post-order-rank
        self.dominators(node).any(|n| n == dom)
    }
```

I'm not sure of the intention of this comment. The `Dominators` struct already operates over post-order rank nodes. Any ideas?
…idtwco

improve unknown enum variant errors

Fixes rust-lang#56517.
Remove strange formatting in `Ordering` docs.

I can't really fathom what the intent of the brackets is. The [original PR](rust-lang#12956) doesn't give any hints. I think it seems fine without them.
std::ops::Div examples: correct nominator to numerator
@cramertj
Copy link
Member Author

@bors r+ p=16

@bors
Copy link
Contributor

bors commented Apr 11, 2019

📌 Commit 3215b70 has been approved by cramertj

@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 11, 2019
@bors
Copy link
Contributor

bors commented Apr 11, 2019

⌛ Testing commit 3215b70 with merge 17ee368b48fdb40365792bffc3adf1d3e7e2587e...

@rust-highfive
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl 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:03:42] 
[01:03:42] ---- [ui] ui/privacy/pub-priv-dep/pub-priv1.rs stdout ----
[01:03:42] diff of stderr:
[01:03:42] 
[01:03:42] - error: type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
[01:03:42] -   --> $DIR/pub-priv1.rs:21:5
[01:03:42] -    |
[01:03:42] - LL |     pub field: OtherType,
[01:03:42] -    |
[01:03:42] - note: lint level defined here
[01:03:42] -   --> $DIR/pub-priv1.rs:4:9
[01:03:42] -    |
[01:03:42] -    |
[01:03:42] - LL | #![deny(exported_private_dependencies)]
[01:03:42] -    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:03:42] + error: extern location for priv_dep does not exist: $TEST_BUILD_DIR/privacy/pub-priv-dep/pub-priv1/auxiliary/libpriv_dep.so
[01:03:42] 12 
[01:03:42] - error: type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
[01:03:42] -   --> $DIR/pub-priv1.rs:28:5
[01:03:42] + error[E0463]: can't find crate for `priv_dep`
[01:03:42] +   --> $DIR/pub-priv1.rs:7:1
[01:03:42] 15    |
[01:03:42] - LL |     pub fn pub_fn(param: OtherType) {}
[01:03:42] -    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:03:42] + LL | extern crate priv_dep;
[01:03:42] 18 
[01:03:42] 18 
[01:03:42] - error: trait `priv_dep::OtherTrait` from private dependency 'priv_dep' in public interface
[01:03:42] -   --> $DIR/pub-priv1.rs:34:1
[01:03:42] -    |
[01:03:42] - LL | / pub trait MyPubTrait {
[01:03:42] - LL | |     type Foo: OtherTrait;
[01:03:42] - LL | | }
[01:03:42] + error: aborting due to 2 previous errors
[01:03:42] 26 
[01:03:42] - error: aborting due to 3 previous errors
[01:03:42] - 
[01:03:42] - 
[01:03:42] + For more information about this error, try `rustc --explain E0463`.
[01:03:42] 29 
[01:03:42] 
[01:03:42] 
[01:03:42] The actual stderr differed from the expected stderr.
[01:03:42] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/pub-priv-dep/pub-priv1/pub-priv1.stderr
[01:03:42] To update references, rerun the tests and pass the `--bless` flag
[01:03:42] To only update this specific test, also pass `--test-args privacy/pub-priv-dep/pub-priv1.rs`
[01:03:42] error: 1 errors occurred comparing output.
[01:03:42] status: exit code: 1
[01:03:42] status: exit code: 1
[01:03:42] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs" "-Zthreads=1" "--target=i686-unknown-linux-musl" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/pub-priv-dep/pub-priv1/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/i686-unknown-linux-musl/native/rust-test-helpers" "-Clinker=/musl-i686/bin/musl-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/pub-priv-dep/pub-priv1/auxiliary" "-A" "unused" "--extern-private" "priv_dep=/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/pub-priv-dep/pub-priv1/auxiliary/libpriv_dep.so"
[01:03:42] ------------------------------------------
[01:03:42] 
[01:03:42] ------------------------------------------
[01:03:42] stderr:
[01:03:42] stderr:
[01:03:42] ------------------------------------------
[01:03:42] {"message":"extern location for priv_dep does not exist: /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/pub-priv-dep/pub-priv1/auxiliary/libpriv_dep.so","code":null,"level":"error","spans":[],"children":[],"rendered":"error: extern location for priv_dep does not exist: /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/pub-priv-dep/pub-priv1/auxiliary/libpriv_dep.so\n\n"}
[01:03:42] {"message":"can't find crate for `priv_dep`","code":{"code":"E0463","explanation":"\nA plugin/crate was declared but cannot be found. Erroneous code example:\n\n```compile_fail,E0463\n#![feature(plugin)]\n#![plugin(cookie_monster)] // error: can't find crate for `cookie_monster`\nextern crate cake_is_a_lie; // error: can't find crate for `cake_is_a_lie`\n```\n\nYou need to link your code to the relevant crate in order to be able to use it\n(through Cargo or the `-L` option of rustc example). Plugins are crates as\nwell, and you link to them the same way.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs","byte_start":158,"byte_end":180,"line_start":7,"line_end":7,"column_start":1,"column_end":23,"is_primary":true,"text":[{"text":"extern crate priv_dep;","highlight_start":1,"highlight_end":23}],"label":"can't find crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0463]: can't find crate for `priv_dep`\n  --> /checkout/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs:7:1\n   |\nLL | extern crate priv_dep;\n   | ^^^^^^^^^^^^^^^^^^^^^^ can't find crate\n\n"}
[01:03:42] {"message":"For more information about this error, try `rustc --explain E0463`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0463`.\n"}
[01:03:42] 
[01:03:42] ------------------------------------------
[01:03:42] 
---
[01:03:42] 
[01:03:42] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:516:22
[01:03:42] 
[01:03:42] 
[01:03:42] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-musl/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-i686-unknown-linux-musl" "--mode" "ui" "--target" "i686-unknown-linux-musl" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "/musl-i686/bin/musl-gcc" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/i686-unknown-linux-musl/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "8.0.0-rust-1.35.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:03:42] 
[01:03:42] 
[01:03:42] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target i586-unknown-linux-gnu,i686-unknown-linux-musl
[01:03:42] Build completed unsuccessfully in 1:00:27
---
travis_time:end:051d89b4:start=1555012028963433563,finish=1555012028975187271,duration=11753708
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:15308fe2
$ 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:118dac81
travis_time:start:118dac81
$ 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:0884e041
$ 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
Copy link
Contributor

bors commented Apr 11, 2019

💔 Test failed - checks-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 Apr 11, 2019
@cramertj cramertj closed this Apr 11, 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.