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

Closed
wants to merge 48 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Aug 14, 2019

Successful merges:

Failed merges:

r? @ghost

chansuke and others added 30 commits July 31, 2019 00:43
Currently mirrors are stored in the rust-lang-ci2 S3 bucket along with
CI toolchains. This is problematic for multiple reasons:

- CI IAM credentials are allowed to both edit and delete those files.
  A malicious user gaining access to those credentials would be able to
  change our mirrored dependencies, possibly backdooring the compiler.

- Contents of the rust-lang-ci2 bucket are disposable except for the
  mirrors' content. When we implement backups for S3 buckets we'd have
  to replicate just that part of the bucket, complicating the backup
  logic and increasing the chance of mistakes. A standalone bucket will
  be way easier to backup.

This commit switches our CI to use the new rust-lang-ci-mirrors bucket.
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
This commit prohibits return position `impl Trait` types that "inherit
lifetimes" from the parent scope. The intent is to forbid cases that are
challenging until they can be addressed properly.
This allows us to record "fresh" lifetime names for cases like `impl
Foo<'_>`.
We now always make fresh lifetimne parameters for all elided
lifetimes, whether they are in the inputs or outputs. But then
we generate `'_` in the case of elided lifetimes from the outputs.

Example:

```rust
async fn foo<'a>(x: &'a u32) -> &u32 { .. }
```

becomes

```rust
type Foo<'a, 'b> = impl Future<Output = &'b u32>;
fn foo<'a>(x: &'a u32) -> Foo<'a, '_>
```
This was causing us to incorrectly think the lifetimes were
already declared on the scope for the nested item, when in fact
they are not inherited.
The slash and quotes in ?/“Kleene” appeared to define “Kleene” as the
name for the ? operator, which is not the case.  Rust has three Kleene
operators *, +, ?.

(Pointed out by /u/Sharlinator on Reddit.)

Signed-off-by: Anders Kaseorg <[email protected]>
This is needed to permit us building core_arch which is a submodule dep
(so we can't snap it to the new beta compiler).
…imes, r=nikomatsakis

typeck: Prohibit RPIT types that inherit lifetimes

Part of rust-lang#61949.

This PR prohibits return position `impl Trait` types that "inherit
lifetimes" from the parent scope. The intent is to forbid cases that are
challenging until they can be addressed properly.

cc @nikomatsakis
…s, r=nikomatsakis

`async fn` lifetime elision tests

Add `async fn` version of the tests in rust-lang#61207 per the first checkbox in rust-lang#62121 (comment).
Works towards resolving blockers in rust-lang#63209.

r? @nikomatsakis
cc @cramertj
Implement Clone, Display for ascii::EscapeDefault

This will mimic the same behaviour as the `char` version; `Display`ing the iterator will give its string representation without advancing it.
syntax: account for CVarArgs being in the argument list.

Fixes rust-lang#63430 by testing for `1` argument (the `CVarArgs` itself) instead of `0`.

Note that the error has basically been impossible to trigger since the change that caused rust-lang#63430, so perhaps we need an audit of untested errors.

Also, this check probably belongs in AST validation/HIR lowering, but I'd rather fix it in place for now.

r? @petrochenkov cc @dlrobertson
Bring back suggestion for splitting `<-` into `< -`

Closes rust-lang#62632
…lexcrichton

ci: move mirrors to their standalone bucket

Currently mirrors are stored in the rust-lang-ci2 S3 bucket along with
CI toolchains. This is problematic for multiple reasons:

- CI IAM credentials are allowed to both edit and delete those files.
  A malicious user gaining access to those credentials would be able to
  change our mirrored dependencies, possibly compromising the compiler.

- Contents of the rust-lang-ci2 bucket are disposable except for the
  mirrors' content. When we implement backups for S3 buckets we'd have
  to replicate just that part of the bucket, complicating the backup
  logic and increasing the chance of mistakes. A standalone bucket will
  be way easier to backup.

This commit switches our CI to use the new rust-lang-ci-mirrors bucket.

r? @alexcrichton
…inaryheap, r=Centril

Document `From` trait for `BinaryHeap`

This PR solves part of rust-lang#51430. (cc @skade)

The comments described allocation and time complexity of the conversion from Vec to BinaryHeap

The complexity description of BinaryHeap operations is available at mod level:
https://doc.rust-lang.org/alloc/collections/binary_heap/index.html

But it doesn't show up at BinaryHeap page:
https://doc.rust-lang.org/alloc/collections/binary_heap/struct.BinaryHeap.html
improve DiagnosticBuilder docs

Cc @estebank @oli-obk

Is there any way to do something like `span_note` but with a label attached to the span? I thought `.span_note().span_label()` would do it, but no, that does not work.
…om-src/libcore/hash, r=Centril

Remove unneeded comment in src/libcore/hash/mod.rs

Split out from larger PR rust-lang#63347 - other sections in there require further discussion.

r? @Centril
…elision-self-mut-self, r=cramertj

handle elision in async fn correctly

We now always make fresh lifetimne parameters for all elided
lifetimes, whether they are in the inputs or outputs. But then
we generate `'_` in the case of elided lifetimes from the outputs.

Example:

```rust
async fn foo<'a>(x: &'a u32) -> &u32 { .. }
```

becomes

```rust
type Foo<'a, 'b> = impl Future<Output = &'b u32>;
fn foo<'a>(x: &'a u32) -> Foo<'a, '_>
```

Fixes rust-lang#63388
…-impl-lifetime, r=cramertj

use `ParamName` to track in-scope lifetimes instead of Ident

Also, clear in-scope lifetimes when visiting nested items.

Fixes rust-lang#63500.
Fixes rust-lang#63225.
Fixes rust-lang#52532.

r? @cramertj
Provide map_ok and map_err method for Poll<Option<Result<T, E>>>

Currently `map_ok` and `map_err` methods are given for `Poll<Result<T, E>>`.

This PR adds these methods for `Poll<Option<Result<T, E>>>` as they are helpful in stream building code.
…tril

RELEASES.md: ? is one of three Kleene operators

The slash and quotes in ?/“Kleene” appeared to define “Kleene” as the name for the `?` operator, which is not the case. Rust has three Kleene operators `*`, `+`, `?`.

([Pointed out](https://www.reddit.com/r/rust/comments/cprt0z/rust_1370_prerelease_testing/ewr90y3/) by /u/Sharlinator on Reddit.)
@Centril
Copy link
Contributor Author

Centril commented Aug 14, 2019

@bors r+ p=16 rollup=never

@bors
Copy link
Contributor

bors commented Aug 14, 2019

📌 Commit f5b0572 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 Aug 14, 2019
@Centril
Copy link
Contributor Author

Centril commented Aug 14, 2019

@bors p=200

@bors
Copy link
Contributor

bors commented Aug 14, 2019

⌛ Testing commit f5b0572 with merge 4dc51d1c3f866a238b2e59e3051cafe7180ad08c...

@bors
Copy link
Contributor

bors commented Aug 14, 2019

💔 Test failed - checks-azure

@rust-highfive
Copy link
Collaborator

The job dist-various-2 of your PR failed (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.
2019-08-14T00:41:25.7062462Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-14T00:41:25.7062516Z 
2019-08-14T00:41:25.7062766Z   git checkout -b <new-branch-name>
2019-08-14T00:41:25.7062811Z 
2019-08-14T00:41:25.7063120Z HEAD is now at 4dc51d1c3 Auto merge of #63541 - Centril:rollup-d3q7074, r=Centril
2019-08-14T00:41:25.7225872Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-14T00:41:25.7229234Z ==============================================================================
2019-08-14T00:41:25.7229327Z Task         : Bash
2019-08-14T00:41:25.7229415Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-14T02:00:29.3214413Z 
2019-08-14T02:00:30.1747553Z error: use of deprecated item 'core::mem::uninitialized': use `mem::MaybeUninit` instead
2019-08-14T02:00:30.1748040Z    --> src/libstd/sys/cloudabi/mutex.rs:107:41
2019-08-14T02:00:30.1748622Z     |
2019-08-14T02:00:30.1749043Z 107 |             let mut event: abi::event = mem::uninitialized();
2019-08-14T02:00:30.1749811Z     |
2019-08-14T02:00:30.1750172Z     = note: `-D deprecated` implied by `-D warnings`
2019-08-14T02:00:30.1750413Z 
2019-08-14T02:00:30.1755828Z error: use of deprecated item 'core::mem::uninitialized': use `mem::MaybeUninit` instead
---
2019-08-14T02:00:30.1757510Z 
2019-08-14T02:00:30.1763290Z error: use of deprecated item 'core::mem::uninitialized': use `mem::MaybeUninit` instead
2019-08-14T02:00:30.1763813Z   --> src/libstd/sys/cloudabi/rwlock.rs:76:41
2019-08-14T02:00:30.1764055Z    |
2019-08-14T02:00:30.1764395Z 76 |             let mut event: abi::event = mem::uninitialized();
2019-08-14T02:00:30.1765012Z 
2019-08-14T02:00:30.1771600Z error: use of deprecated item 'core::mem::uninitialized': use `mem::MaybeUninit` instead
2019-08-14T02:00:30.1772346Z   --> src/libstd/sys/cloudabi/rwlock.rs:77:38
2019-08-14T02:00:30.1772811Z    |
2019-08-14T02:00:30.1772811Z    |
2019-08-14T02:00:30.1773344Z 77 |             let mut nevents: usize = mem::uninitialized();
2019-08-14T02:00:30.1773747Z    |                                      ^^^^^^^^^^^^^^^^^^
2019-08-14T02:00:30.1773817Z 
2019-08-14T02:00:30.1834257Z error: use of deprecated item 'core::mem::uninitialized': use `mem::MaybeUninit` instead
2019-08-14T02:00:30.1834635Z    --> src/libstd/sys/cloudabi/rwlock.rs:185:41
2019-08-14T02:00:30.1835204Z     |
2019-08-14T02:00:30.1835598Z 185 |             let mut event: abi::event = mem::uninitialized();
2019-08-14T02:00:30.1836289Z 
2019-08-14T02:00:30.1837012Z error: use of deprecated item 'core::mem::uninitialized': use `mem::MaybeUninit` instead
2019-08-14T02:00:30.1837423Z    --> src/libstd/sys/cloudabi/rwlock.rs:186:38
2019-08-14T02:00:30.1837689Z     |
2019-08-14T02:00:30.1837689Z     |
2019-08-14T02:00:30.1838060Z 186 |             let mut nevents: usize = mem::uninitialized();
2019-08-14T02:00:30.1838430Z     |                                      ^^^^^^^^^^^^^^^^^^
2019-08-14T02:00:30.1838516Z 
2019-08-14T02:00:30.1838852Z error: use of deprecated item 'core::mem::uninitialized': use `mem::MaybeUninit` instead
2019-08-14T02:00:30.1839375Z   --> src/libstd/sys/cloudabi/thread.rs:75:41
2019-08-14T02:00:30.1839647Z    |
2019-08-14T02:00:30.1840017Z 75 |             let mut event: abi::event = mem::uninitialized();
2019-08-14T02:00:30.1840768Z 
2019-08-14T02:00:30.1841061Z error: use of deprecated item 'core::mem::uninitialized': use `mem::MaybeUninit` instead
2019-08-14T02:00:30.1841360Z   --> src/libstd/sys/cloudabi/thread.rs:76:38
2019-08-14T02:00:30.1841584Z    |
---
2019-08-14T02:00:32.2439626Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-cloudabi" "-j" "2" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json-render-diagnostics"
2019-08-14T02:00:32.2439869Z expected success, got: exit code: 101
2019-08-14T02:00:32.2444471Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --target x86_64-fuchsia,aarch64-fuchsia,wasm32-unknown-unknown,wasm32-wasi,sparcv9-sun-solaris,x86_64-sun-solaris,x86_64-unknown-linux-gnux32,x86_64-unknown-cloudabi,x86_64-fortanix-unknown-sgx,nvptx64-nvidia-cuda,armv7-unknown-linux-gnueabi,armv7-unknown-linux-musleabi
2019-08-14T02:00:32.2444675Z Build completed unsuccessfully in 1:12:13
2019-08-14T02:00:34.2906551Z ##[error]Bash exited with code '1'.
2019-08-14T02:00:34.2948107Z ##[section]Starting: Upload CPU usage statistics
2019-08-14T02:00:34.2956031Z ==============================================================================
2019-08-14T02:00:34.2956113Z Task         : Bash
2019-08-14T02:00:34.2956189Z Description  : Run a Bash script on macOS, Linux, or Windows

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 Aug 14, 2019
@Centril Centril mentioned this pull request Aug 14, 2019
@Centril Centril closed this Aug 14, 2019
@Centril Centril deleted the rollup-d3q7074 branch August 14, 2019 02:20
@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.