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 10 pull requests #81982

Closed
wants to merge 25 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dylni and others added 25 commits February 1, 2021 20:27
Updates `tools.mk` to explicitly require `SHELL := /bin/dash`, since CI
uses `dash` but other environments (including developer local machines)
may default to `bash`.

Replaces bash-specific shell command in one Makefile with a
dash-compatible alternative, and re-enables the affected Makefile test.

Removes apparently redundant definition of `UNAME`.
Move the note about dropping cloudabi next to the other platform support
changes.
Introduced in d3c4dbd, noticed only
after the fact, sorry. 😅

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
We now allow two new casts:

- mut array reference to mut ptr. Example:

      let mut x: [usize; 2] = [0, 0];
      let p = &mut x as *mut usize;

  We allow casting const array references to const pointers so not
  allowing mut references to mut pointers was inconsistent.

- mut array reference to const ptr. Example:

      let mut x: [usize; 2] = [0, 0];
      let p = &mut x as *const usize;

  This was similarly inconsistent as we allow casting mut references to
  const pointers.

Existing test 'vector-cast-weirdness' updated to test both cases.

Fixes rust-lang#24151
Fixes rust-lang#81928

“Ask forgiveness not permission”  : this makes the code both simpler and more robust
…rochenkov

Borrowck: don't calculate unused info when reporting move errors
… r=KodrAus

Improve design of `assert_len`

It was discussed in the [tracking issue](rust-lang#76393 (comment)) that `assert_len`'s name and usage are confusing. This PR improves them based on a suggestion by `@scottmcm` in that issue.

I also improved the documentation to make it clearer when you might want to use this method.

Old example:

```rust
let range = range.assert_len(slice.len());
```

New example:

```rust
let range = range.ensure_subset_of(..slice.len());
```

Fixes rust-lang#81157
Allow casting mut array ref to mut ptr

Allow casting mut array ref to mut ptr

We now allow two new casts:

- mut array reference to mut ptr. Example:

      let mut x: [usize; 2] = [0, 0];
      let p = &mut x as *mut usize;

  We allow casting const array references to const pointers so not
  allowing mut references to mut pointers was inconsistent.

- mut array reference to const ptr. Example:

      let mut x: [usize; 2] = [0, 0];
      let p = &mut x as *const usize;

  This was similarly inconsistent as we allow casting mut references to
  const pointers.

Existing test 'vector-cast-weirdness' updated to test both cases.

Fixes rust-lang#24151
Ensures `make` tests run under /bin/dash (if available), like CI, and fixes a Makefile

Note: This cherrypicks rust-lang#81688 (`@pnkfelix)`

Updates `tools.mk` to explicitly require `SHELL := /bin/dash`, since CI uses `dash` but other environments (including developer local machines) may default to `bash`.

Replaces bash-specific shell command in one Makefile with a dash-compatible alternative, and re-enables the affected Makefile test.

Removes apparently redundant definition of `UNAME`.

Also see: [zulip discussion thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/how.20to.20run.2Fbless.20src.2Ftest.2Frun-make-fulldeps.2Fcoverage.20.3F)

r? `@pnkfelix`

FYI: `@wesleywiser` `@tmandry`
Relax ItemCtxt::to_ty lifetime

Tiny simplification by relaxing a lifetime.
…atform-notes, r=XAMPPRocky

RELEASES.md 1.50: Group platform support notes together

Move the note about dropping cloudabi next to the other platform support
changes.
bootstrap: Locate llvm-dwp based on llvm-config bindir

Fixes rust-lang#81949.

Tested by successfully building 1.50.0 pre-release, which is where I originally hit the issue (https://internals.rust-lang.org/t/rust-1-50-0-pre-release-testing/14012/4?u=dtolnay). Tested both with and without prebuilt LLVM. The check for dry_run is necessary in the non-prebuilt case because the llvm-config built by bootstrap won't exist yet.
Fix assosiated typo

Introduced in d3c4dbd, noticed only
after the fact, sorry. 😅

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Fix documentation not showing on localStorage error

Fixes rust-lang#81928

The [documentation for setItem](https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem) specifies:

> developers should make sure to always catch possible exceptions from setItem()
…r=Mark-Simulacrum

bootstrap: fix wrong docs installation path

This PR fixes rust-lang#81967, a regression introduced by rust-lang#80797. The commit has already been backported to stable 1.50.0.

r? `@Mark-Simulacrum`
@rustbot rustbot added the rollup A PR which is a rollup label Feb 11, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Feb 11, 2021

📌 Commit 551f510 has been approved by JohnTitor

@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 11, 2021
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking cfg-if v0.1.10
    Checking adler v0.2.3
    Checking rustc-demangle v0.1.18
    Checking panic_abort v0.0.0 (/checkout/library/panic_abort)
error[E0599]: no method named `assert_len` found for type parameter `R` in the current scope
     |
     |
1986 |         let range = src.assert_len(self.len());
     |                         ^^^^^^^^^^ method not found in `R`
error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `alloc`
error: could not compile `alloc`

To learn more, run the command again with --verbose.
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:01:45

@JohnTitor JohnTitor closed this Feb 11, 2021
@JohnTitor JohnTitor deleted the rollup-uh2dzl7 branch February 11, 2021 01:56
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet