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 18 pull requests #59161

Closed
wants to merge 52 commits into from
Closed

Conversation

pietroalbini
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

sfackler and others added 30 commits March 7, 2019 18:39
A `Def::Variant` should be considered as a function in mir pretty
printing. Each variant has a constructor that we must print.

Given the following enum definition:

```
pub enum TestMe {
    X(usize),
}
```

We will need to generate a constructor for the variant `X` with a
signature that looks something like the following:

```
fn TestMe::X(_1: usize) -> TestMe;
```
Co-Authored-By: kennytm <kennytm@gmail.com>
This should make it easier to identify what each job is doing when looking at the Travis or Appveyor UI.

- Set `name` for each job in Travis.
- Move `CI_JOB_NAME` to the front in Appveyor so that it appears first in the UI.
Angelos Oikonomopoulos and others added 20 commits March 13, 2019 14:15
Rewrite the SelfCtor early and use the replacement Def when
calculating the path_segs.

Note that this also changes which def is seen by the code that
computes user_self_ty and is_alias_variant_ctor; I don't see a
immediate issue with that, but I'm not 100% clear on the
implications.

Fixes rust-lang#57924
…chton

Fix SGX implementations of read/write_vectored.
Fix generic argument lookup for Self

Rewrite the SelfCtor early and use the replacement Def when
calculating the path_segs.

Note that this also changes which def is seen by the code that
computes user_self_ty and is_alias_variant_ctor; I don't see a
immediate issue with that, but I'm not 100% clear on the
implications.

Fixes rust-lang#57924

r? @eddyb
…twco

When encountetring `||{}()`, suggest the likely intended `(||{})()`

Fix rust-lang#55851.
Fix ICE in MIR pretty printing

A `Def::Variant` should be considered as a function in mir pretty
printing. Each variant has a constructor that we must print.

Given the following enum definition:

```rust
pub enum TestMe {
    X(usize),
}
```

We will need to generate a constructor for the variant `X` with a
signature that looks something like the following:

```
fn TestMe::X(_1: usize) -> TestMe;
```

Fixes: rust-lang#59021
…tMisdreavus

Avoid some common false positives in intra doc link checking

The empty string case is never going to be a link. The numeric case may be a link, but if it were it would have resolved locally. It's more likely the makeshift markdown footnote notation (`[0]`, etc)

r? @QuietMisdreavus
Track embedded-book in the toolstate

The embedded book was tested in the tools job but the test result was never published. This PR adds maintainer information of embedded-book. This PR also requires the next update to embedded-book to pass the all tests, currently its state is test-fail.

rust-lang-nursery/rust-toolstate#10 should be merged before this PR.
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
CI: Set job names.

This should make it easier to identify what each job is doing when looking at the Travis or Appveyor UI.

- Set `name` for each job in Travis.
- Move `CI_JOB_NAME` to the front in Appveyor so that it appears first in the UI.
we can now skip should_panic tests with the libtest harness
…Centril

A few improvements to comments in user-facing crates

Not too many this time, and all concern comments (almost all doc comments) in user-facing crates (libstd, libcore, liballoc).

r? @steveklabnik
middle: replace NodeId with HirId in AccessLevels

Pushing the limits of HirIdification (rust-lang#57578).

Replaces `NodeId` with `HirId` in `middle::privacy::AccessLevels`. Actually this time I was more successful and cracked it; I probably tried to HirIdify too much at once when I attempted it last time ^^.

r? @Zoxc
…chton

Consistent naming for duration_float methods and additional f32 methods

`duration_float` tracking issue: rust-lang#54361

New list of methods:
- `as_secs_f64(&self) -> f64`
- `as_secs_f32(&self) -> f32`
- `from_secs_f64(secs: f64) -> Duration`
- `from_secs_f32(secs: f32) -> Duration`
- `mul_f64(self, rhs: f64) -> Duration`
- `mul_f32(self, rhs: f32) -> Duration`
- `div_f64(self, rhs: f64) -> Duration`
- `div_f32(self, rhs: f64) -> Duration`
- `div_duration_f64(self, rhs: Duration) -> f64`
- `div_duration_f32(self, rhs: Duration) -> f32`

With [`num_traits::Float`](https://docs.rs/num-traits/0.2.6/num_traits/float/trait.Float.html) we could've reduced number of methods by factor of two, but unfortunately it's not part of `std`.
Add peer_addr function to UdpSocket

Fixes rust-lang#59104

This is my first pull request to Rust, so opening early for some feedback.

My biggest question is: where do I add tests?

Any comments very much appreciated!
Be more discerning on when to attempt suggesting a comma in a macro invocation

Fix rust-lang#58796.
…=alexreg

rustc: fix ICE when trait alias has bare Self

Fixes rust-lang#59029
…RalfJung

Unregress using scalar unions in constants.

fixes rust-lang#59126

r? @RalfJung

I also made a bunch of these invariants panic instead of report an error.
Suggest return lifetime when there's only one named lifetime

Fix rust-lang#29094.
Make std time tests more robust for platform differences

Previously, `time::tests::since_epoch` and `time::tests::system_time_math` would fail if the platform represents a SystemTime as unix epoch + `u64` nanoseconds.

r? @sfackler
@pietroalbini
Copy link
Member Author

@bors r+ p=18

@bors
Copy link
Contributor

bors commented Mar 13, 2019

📌 Commit 4769f8f 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 Mar 13, 2019
@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:110ab694:start=1552492657611430488,finish=1552492744743887691,duration=87132457203
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
Setting environment variables from .travis.yml
$ export CI_JOB_NAME=$TRAVIS_JOB_NAME
$ export RUST_BACKTRACE=1
$ bash -c 'echo $BASH_VERSION'
4.3.48(1)-release
travis_fold:start:before_install.1
---
[00:02:00]  ---> 7c0efeafa58e
[00:02:00] Successfully built 7c0efeafa58e
[00:02:00] Successfully tagged rust-ci:latest
[00:02:00] Built container sha256:7c0efeafa58e1b9db6c334b474c73b0869cee206cfcb66de33b8d99697b73836
[00:02:00] Uploading finished image to s3://rust-lang-ci-sccache2/docker/8dcfaffd04024de90126ffc81fcdb56fbaa8e5ec2fe8eae50ae68cfe40ef281bfe4085b2d7cde31c578de2a90470847e278efbef6e401173da016643f489dbaa
[00:02:48] upload failed: - to s3://rust-lang-ci-sccache2/docker/8dcfaffd04024de90126ffc81fcdb56fbaa8e5ec2fe8eae50ae68cfe40ef281bfe4085b2d7cde31c578de2a90470847e278efbef6e401173da016643f489dbaa Unable to locate credentials

[00:02:49] travis_time:end:1b48d4ea:start=1552492778857228772,finish=1552492924840488221,duration=145983259449
[CI_JOB_NAME=x86_64-gnu-llvm-6.0]
[00:02:49] [CI_JOB_NAME=x86_64-gnu-llvm-6.0]
---
[01:12:20] .................................................................................................... 4400/5473
[01:12:23] .................................................................................................... 4500/5473
[01:12:26] .................................................................................................... 4600/5473
[01:12:31] ...............i.................................................................................... 4700/5473
[01:12:36] ...............................F.................................................................... 4800/5473
[01:12:43] .................................................................................................... 5000/5473
[01:12:47] .................................................................................................... 5100/5473
[01:12:51] .................................................................................................... 5200/5473
[01:12:54] .................................................................................................... 5300/5473
---
[01:12:59] 
[01:12:59] 1 error: cannot use a built-in attribute through an import
[01:12:59] 2   --> $DIR/cross-crate.rs:7:3
[01:12:59] 3    |
[01:12:59] - LL | #[built_in_attr] //~ ERROR cannot use a built-in attribute through an import
[01:12:59] + LL | #[built_in_attr]
[01:12:59] 6    |
[01:12:59] 7 note: the built-in attribute imported here
[01:12:59] 
[01:12:59] 13 error: cannot use a tool module through an import
[01:12:59] 13 error: cannot use a tool module through an import
[01:12:59] 14   --> $DIR/cross-crate.rs:8:3
[01:12:59] 15    |
[01:12:59] - LL | #[tool_mod::skip] //~ ERROR cannot use a tool module through an import
[0gh an import","highlight_start":3,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the tool module imported here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs","byte_start":75,"byte_end":89,"line_start":5,"line_end":5,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"use cross_crate::*;","highlight_start":5,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot use a tool module through an import\n  --> /checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs:8:3\n   |\nLL | #[tool_mod::skip] //~ ERROR cannot use a tool module through an import\n   |   ^^^^^^^^\n   |\nnote: the tool module imported here\n  --> /checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs:5:5\n   |\nLL | use cross_crate::*;\n   |     ^^^^^^^^^^^^^^\n\n"}
[01:12:59] 
[01:12:59] ------------------------------------------
[01:12:59] 
[01:12:59] thread '[ui] ui/rust-2018/uniform-paths/cross-crate.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3325:9
---
[01:12:59] 
[01:12:59] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:496:22
[01:12:59] 
[01:12:59] 
[01:12:59] 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/x86_64-unknown-linux-gnu/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-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--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/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:12:59] 
[01:12:59] 
[01:12:59] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:12:59] Build completed unsuccessfully in 0:04:19
---
travis_time:end:01827c80:start=1552497137285392104,finish=1552497137290354785,duration=4962681
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:272e1cb0
$ 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:011824dc
travis_time:start:011824dc
$ 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:010a0e24
$ 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)

@pietroalbini
Copy link
Member Author

@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 Mar 13, 2019
@Centril Centril closed this Mar 13, 2019
@pietroalbini pietroalbini deleted the rollup branch March 13, 2019 17:40
@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.