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 8 pull requests #62219

Closed
wants to merge 33 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jun 28, 2019

Successful merges:

Failed merges:

r? @ghost

ollie27 and others added 30 commits June 8, 2019 18:25
This reverts commit 8ed2292.

It caused doctests in this repository to no longer be tested including all of the core crate.
For `libc` types that will be initialized in FFI calls, we can just use
`MaybeUninit` and then pass around raw pointers.

For `sun_path_offset()`, which really wants `offset_of`, all callers
have a real `sockaddr_un` available, so we can use that reference.
A small PR to fix a small CS typo in `iter/traits/collect.rs`.
…sdreavus

Revert "Set test flag when rustdoc is running with --test option"

Reverts rust-lang#59940.

It caused doctests in this repository to no longer be tested including all of the core crate.
…petrochenkov

Add `--pass $mode` to compiletest through `./x.py`

Adds a flag `--pass $mode` to compiletest, which is exposed through `./x.py`.

When `--pass $mode` is passed, `{check,build,compile,run}-pass` tests will be forced to run under the given `$mode` unless the directive `// ignore-pass` exists in the test file.

The modes are explained in rust-lang#61778:
- `check` has the same effect as `cargo check`
- `build` or `compile` have the same effect as `cargo build`
- `run` has the same effect as `cargo run`

On my machine, `./x.py -i test src/test/run-pass --stage 1 --pass check` takes 38 seconds whereas it takes 2 min 7 seconds without `--pass check`.

cc rust-lang#61712

r? @petrochenkov
publish_toolstate: don't use 'new' from inside the loop

I think I made a mistake in rust-lang#61938 by using `new` outside the inner loop. This PR fixes that.

However, no issue got created at all for rust-lang#62003 (comment), and I don't know why that is.   The script should be [triggered by Traivs](https://github.com/rust-lang/rust/blob/56a12b2ad058f22f1ef090713df15598525ba4a4/.travis.yml#L240), and I can find no trace of that in [the build log](https://travis-ci.com/rust-lang/rust/jobs/209880042).
Inform the query system about properties of queries at compile time
…g,oli-obk,Centril

Implement mem::{zeroed,uninitialized} in terms of MaybeUninit.

Refs rust-lang#62061

r? @oli-obk
Avoid mem::uninitialized() in std::sys::unix

For `libc` types that will be initialized in FFI calls, we can just use
`MaybeUninit` and then pass around raw pointers.

For `sun_path_offset()`, which really wants `offset_of`, all callers
have a real `sockaddr_un` available, so we can use that reference.

r? @RalfJung
doc(libcore) Fix CS

A small PR to fix a small CS typo in `iter/traits/collect.rs`.
@Centril
Copy link
Contributor Author

Centril commented Jun 28, 2019

@bors r+ p=8 rollup=never

@bors
Copy link
Contributor

bors commented Jun 28, 2019

📌 Commit 3494fa9 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 Jun 28, 2019
@bors
Copy link
Contributor

bors commented Jun 28, 2019

⌛ Testing commit 3494fa9 with merge 081c72b59121740e611624c652fc307223327c60...

@Centril
Copy link
Contributor Author

Centril commented Jun 28, 2019

@bors retry Yielding prio to #62209

@bors
Copy link
Contributor

bors commented Jun 28, 2019

⌛ Testing commit 3494fa9 with merge ebc923f4b2f49dd65548df3533abdf064b35251a...

@Centril
Copy link
Contributor Author

Centril commented Jun 28, 2019

@bors retry Yielding prio to #62209

@bors
Copy link
Contributor

bors commented Jun 29, 2019

⌛ Testing commit 3494fa9 with merge 1d03809eb822469f7394d2d8ea2fd53f37beb959...

@bors
Copy link
Contributor

bors commented Jun 29, 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 Jun 29, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-tools 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:30:39] expected stderr:
[01:30:39] error: reference to zeroed memory
[01:30:39]   --> $DIR/invalid_ref.rs:24:24
[01:30:39]    |
[01:30:39] LL |     let ref_zero: &T = std::mem::zeroed(); // warning
[01:30:39]    |
[01:30:39]    = note: #[deny(clippy::invalid_ref)] on by default
[01:30:39]    = note: #[deny(clippy::invalid_ref)] on by default
[01:30:39]    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] error: reference to zeroed memory
[01:30:39]   --> $DIR/invalid_ref.rs:28:24
[01:30:39]    |
[01:30:39]    |
[01:30:39] LL |     let ref_zero: &T = core::mem::zeroed(); // warning
[01:30:39]    |
[01:30:39]    |
[01:30:39]    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] error: reference to zeroed memory
[01:30:39]   --> $DIR/invalid_ref.rs:32:24
[01:30:39]    |
[01:30:39]    |
[01:30:39] LL |     let ref_zero: &T = std::intrinsics::init(); // warning
[01:30:39]    |
[01:30:39]    |
[01:30:39]    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] error: reference to uninitialized memory
[01:30:39]   --> $DIR/invalid_ref.rs:36:26
[01:30:39]    |
[01:30:39] LL |     let ref_uninit: &T = std::mem::uninitialized(); // warning
[01:30:39] LL |     let ref_uninit: &T = std::mem::uninitialized(); // warning
[01:30:39]    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^
[01:30:39]    |
[01:30:39]    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] error: reference to uninitialized memory
[01:30:39]   --> $DIR/invalid_ref.rs:40:26
[01:30:39]    |
[01:30:39] LL |     let ref_uninit: &T = core::mem::uninitialized(); // warning
[01:30:39] LL |     let ref_uninit: &T = core::mem::uninitialized(); // warning
[01:30:39]    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:30:39]    |
[01:30:39]    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] error: reference to uninitialized memory
[01:30:39]   --> $DIR/invalid_ref.rs:44:26
[01:30:39]    |
[01:30:39] LL |     let ref_uninit: &T = std::intrinsics::uninit(); // warning
[01:30:39] LL |     let ref_uninit: &T = std::intrinsics::uninit(); // warning
[01:30:39]    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^
[01:30:39]    |
[01:30:39]    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] error: aborting due to 6 previous errors
[01:30:39] 
[01:30:39] 
[01:30:39] 
[01:30:39] 
[01:30:39] diff of stderr:
[01:30:39] 
[01:30:39] -error: reference to zeroed memory
[01:30:39] -  --> $DIR/invalid_ref.rs:24:24
[01:30:39] +error[E0432]: unresolved import `std::intrinsics::uninit`
[01:30:39] +  --> $DIR/invalid_ref.rs:5:29
[01:30:39]     |
[01:30:39] -LL |     let ref_zero: &T = std::mem::zeroed(); // warning
[01:30:39] -   |
[01:30:39] -   = note: #[deny(clippy::invalid_ref)] on by default
[01:30:39] -   = note: #[deny(clippy::invalid_ref)] on by default
[01:30:39] -   = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] +LL | use std::intrinsics::{init, uninit};
[01:30:39] +   |                             |
[01:30:39] +   |                             no `uninit` in `intrinsics`
[01:30:39] +   |                             help: a similar name exists in the module: `init`
[01:30:39]  
[01:30:39]  
[01:30:39] -error: reference to zeroed memory
[01:30:39] -  --> $DIR/invalid_ref.rs:28:24
[01:30:39] +error[E0425]: cannot find function `uninit` in module `std::intrinsics`
[01:30:39] +  --> $DIR/invalid_ref.rs:44:43
[01:30:39]     |
[01:30:39] -LL |     let ref_zero: &T = core::mem::zeroed(); // warning
[01:30:39] -   |
[01:30:39] -   |
[01:30:39] -   = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] -error: reference to zeroed memory
[01:30:39] -  --> $DIR/invalid_ref.rs:32:24
[01:30:39] -   |
[01:30:39] -   |
[01:30:39] -LL |     let ref_zero: &T = std::intrinsics::init(); // warning
[01:30:39] -   |
[01:30:39] -   |
[01:30:39] -   = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] -error: reference to uninitialized memory
[01:30:39] -  --> $DIR/invalid_ref.rs:36:26
[01:30:39] -   |
[01:30:39] -LL |     let ref_uninit: &T = std::mem::uninitialized(); // warning
[01:30:39] -LL |     let ref_uninit: &T = std::mem::uninitialized(); // warning
[01:30:39] -   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^
[01:30:39] -   |
[01:30:39] -   = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] -error: reference to uninitialized memory
[01:30:39] -  --> $DIR/invalid_ref.rs:40:26
[01:30:39] -   |
[01:30:39] -LL |     let ref_uninit: &T = core::mem::uninitialized(); // warning
[01:30:39] -LL |     let ref_uninit: &T = core::mem::uninitialized(); // warning
[01:30:39] -   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:30:39] -   |
[01:30:39] -   = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39] -error: reference to uninitialized memory
[01:30:39] -  --> $DIR/invalid_ref.rs:44:26
[01:30:39] -   |
[01:30:39]  LL |     let ref_uninit: &T = std::intrinsics::uninit(); // warning
[01:30:39]  LL |     let ref_uninit: &T = std::intrinsics::uninit(); // warning
[01:30:39] -   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^
[01:30:39] -   |
[01:30:39] -   = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
[01:30:39]  
[01:30:39] -error: aborting due to 6 previous errors
[01:30:39] +error: aborting due to 2 previous errors
[01:30:39]  
---
[01:30:39] 
[01:30:39] ------------------------------------------
[01:30:39] stderr:
[01:30:39] ------------------------------------------
[01:30:39] {"message":"unresolved import `std::intrinsics::uninit`","code":{"code":"E0432","explanation":"\nAn import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nPaths in `use` statements are relative to the crate root. To import items\nrelative to the current and parent modules, use the `self::` and `super::`\nprefixes, respectively. Also verify that you didn't misspell the import\nname and that the import exists in the module from where you tried to\nimport it. Example:\n\n```\nuse self::something::Foo; // ok!\n\nmod something {\n    pub struct Foo;\n}\n# fn main() {}\n```\n\nOr, if you tried to use a module from an external crate, you may have missed\nthe `extern crate` declaration (which is usually placed in the crate root):\n\n```\nextern crate core; // Required to use the `core` crate\n\nuse core::any;\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"tests/ui/invalid_ref.rs","byte_start":95,"byte_end":101,"line_start":5,"line_end":5,"column_start":29,"column_end":35,"is_primary":true,"text":[{"text":"use std::intrinsics::{init, uninit};","highlight_start":29,"highlight_end":35}],"label":"no `uninit` in `intrinsics`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"a similar name exists in the module","code":null,"level":"help","spans":[{"file_name":"tests/ui/invalid_ref.rs","byte_start":95,"byte_end":101,"line_start":5,"line_end":5,"column_start":29,"column_end":35,"is_primary":true,"text":[{"text":"use std::intrinsics::{init, uninit};","highlight_start":29,"highlight_end":35}],"label":null,"suggested_replacement":"init","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0432]: unresolved import `std::intrinsics::uninit`\n  --> tests/ui/invalid_ref.rs:5:29\n   |\nLL | use std::intrinsics::{init, uninit};\n   |                             ^^^^^^\n   |                             |\n   |                             no `uninit` in `intrinsics`\n   |                             help: a similar name exists in the module: `init`\n\n"}
[01:30:39] {"message":"cannot find function `uninit` in module `std::intrinsics`","code":{"code":"E0425","explanation":"\nAn unresolved name was used.\n\nErroneous code examples:\n\n```compile_fail,E0425\nsomething_that_doesnt_exist::foo;\n// error: unresolved name `something_that_doesnt_exist::foo`\n\n// or:\n\ntrait Foo {\n    fn bar() {\n        Self; // error: unresolved name `Self`\n    }\n}\n\n// or:\n\nlet x = unknown_variable;  // error: unresolved name `unknown_variable`\n```\n\nPlease verify that the name wasn't misspelled and ensure that the\nidentifier being referred to is valid for the given situation. Example:\n\n```\nenum something_that_does_exist {\n    Foo,\n}\n```\n\nOr:\n\n```\nmod something_that_does_exist {\n    pub static foo : i32 = 0i32;\n}\n\nsomething_that_does_exist::foo; // ok!\n```\n\nOr:\n\n```\nlet unknown_variable = 12u32;\nlet x = unknown_variable; // ok!\n```\n\nIf the item is not defined in the current module, it must be imported using a\n`use` statement, like so:\n\n```\n# mod foo { pub fn bar() {} }\n# fn main() {\nuse foo::bar;\nbar();\n# }\n```\n\nIf the item you are importing is not defined in some super-module of the\ncurrent module, then it must also be declared as public (e.g., `pub fn`).\n"},"level":"error","spans":[{"file_name":"tests/ui/invalid_ref.rs","byte_start":1095,"byte_end":1101,"line_start":44,"line_end":44,"column_start":43,"column_end":49,"is_primary":true,"text":[{"text":"    let ref_uninit: &T = std::intrinsics::uninit(); // warning","highlight_start":43,"highlight_end":49}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"a function with a similar name exists","code":null,"level":"help","spans":[{"file_name":"tests/ui/invalid_ref.rs","byte_start":1095,"byte_end":1101,"line_start":44,"line_end":44,"column_start":43,"column_end":49,"is_primary":true,"text":[{"text":"    let ref_uninit: &T = std::intrinsics::uninit(); // warning","highlight_start":43,"highlight_end":49}],"label":null,"suggested_replacement":"init","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0425]: cannot find function `uninit` in module `std::intrinsics`\n  --> tests/ui/invalid_ref.rs:44:43\n   |\nLL |     let ref_uninit: &T = std::intrinsics::uninit(); // warning\n   |                                           ^^^^^^ help: a function with a similar name exists: `init`\n\n"}
[01:30:39] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[01:30:39] {"message":"Some errors have detailed explanations: E0425, E0432.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors have detailed explanations: E0425, E0432.\n"}
[01:30:39] 
[01:30:39] ------------------------------------------
[01:30:39] 
[01:30:39] thread '[ui] ui/invalid_ref.rs' panicked at 'explicit panic', /cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.22/src/runtest.rs:2632:9
---
travis_time:end:007a188c:start=1561777576018316920,finish=1561777576026641796,duration=8324876
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:375222b4
$ 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:024a547d
travis_time:start:024a547d
$ 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:228ff6c0
$ 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)

@Centril Centril closed this Jun 29, 2019
@Centril Centril deleted the rollup-94tkrb4 branch June 29, 2019 09:18
@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.

None yet